Skip to content

Commit fbabf70

Browse files
committed
Fix all violations of SA1129 (DoNotUseDefaultValueTypeConstructor)
1 parent 9689db6 commit fbabf70

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1642SA1643CodeFixProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private static XmlEmptyElementSyntax BuildSeeElement(SyntaxToken identifier, Typ
265265

266266
private static TypeArgumentListSyntax ParameterToArgumentListSyntax(TypeParameterListSyntax typeParameters)
267267
{
268-
var list = new SeparatedSyntaxList<TypeSyntax>();
268+
var list = SyntaxFactory.SeparatedList<TypeSyntax>();
269269
list = list.AddRange(typeParameters.Parameters.Select(p => SyntaxFactory.ParseName(p.ToString()).WithTriviaFrom(p)));
270270

271271
for (int i = 0; i < list.SeparatorCount; i++)

StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1120CodeFixProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private static async Task<Document> GetTransformedDocumentAsync(Document documen
7979
// Replace all roots with an empty node
8080
var newRoot = root.ReplaceTrivia(triviaToRemove, (original, rewritten) =>
8181
{
82-
return new SyntaxTrivia();
82+
return default(SyntaxTrivia);
8383
});
8484

8585
Document updatedDocument = document.WithSyntaxRoot(newRoot);

0 commit comments

Comments
 (0)