Skip to content

Commit e30b94c

Browse files
committed
Update to StyleCop.Analyzers 1.2.0-beta.304
1 parent 74c46ee commit e30b94c

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

StyleCop.Analyzers/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<ItemGroup>
4646
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
4747
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.46" PrivateAssets="all" />
48-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.205" PrivateAssets="all" />
48+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.304" PrivateAssets="all" />
4949
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.0" PrivateAssets="all" />
5050
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="3.8.0" PrivateAssets="all" />
5151
</ItemGroup>

StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/FixAllContextHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic
5555
{
5656
var projectDiagnostics = await GetAllDiagnosticsAsync(fixAllContext, projectToFix).ConfigureAwait(false);
5757
diagnostics.TryAdd(projectToFix.Id, projectDiagnostics);
58-
}, fixAllContext.CancellationToken);
58+
},
59+
fixAllContext.CancellationToken);
5960
}
6061

6162
await Task.WhenAll(tasks).ConfigureAwait(false);

StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/MaintainabilityRules/SA1404CodeFixProvider.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context)
5050
CodeAction.Create(
5151
MaintainabilityResources.SA1404CodeFix,
5252
token => AddJustificationToAttributeAsync(context.Document, root, attribute),
53-
nameof(SA1404CodeFixProvider) + "-Add"), diagnostic);
53+
nameof(SA1404CodeFixProvider) + "-Add"),
54+
diagnostic);
5455
return;
5556
}
5657

@@ -60,7 +61,8 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context)
6061
CodeAction.Create(
6162
MaintainabilityResources.SA1404CodeFix,
6263
token => UpdateValueOfArgumentAsync(context.Document, root, argument),
63-
nameof(SA1404CodeFixProvider) + "-Update"), diagnostic);
64+
nameof(SA1404CodeFixProvider) + "-Update"),
65+
diagnostic);
6466
return;
6567
}
6668
}

StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/OrderingRules/SA1206CodeFixProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ private static SyntaxTokenList FullySortModifiers(SyntaxTokenList modifiers)
9595
return AdjustTrivia(
9696
accessModifiers
9797
.Concat(staticModifiers)
98-
.Concat(otherModifiers), modifiers);
98+
.Concat(otherModifiers),
99+
modifiers);
99100
}
100101

101102
/// <summary>

StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ public async Task TestClosingBracketFollowedByNoSpaceAndIncrementOrDecrementOper
259259
{
260260
string validStatament = string.Format(
261261
@"var i = new int[1];
262-
i[0]{0};", operatorText);
262+
i[0]{0};",
263+
operatorText);
263264

264265
await this.TestWhitespaceInStatementOrDeclAsync(validStatament, null, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(false);
265266
}
@@ -271,11 +272,13 @@ public async Task TestClosingBracketFollowedBySpaceAndIncrementOrDecrementOperat
271272
{
272273
string invalidStatament = string.Format(
273274
@"var i = new int[1];
274-
i[0] {0};", operatorText);
275+
i[0] {0};",
276+
operatorText);
275277

276278
string fixedStatament = string.Format(
277279
@"var i = new int[1];
278-
i[0]{0};", operatorText);
280+
i[0]{0};",
281+
operatorText);
279282

280283
DiagnosticResult expected = Diagnostic().WithLocation(8, 16).WithArguments(" not", "followed");
281284

0 commit comments

Comments
 (0)