From 2ee1867ffaf152fece46baf91ad1673f9395e5f3 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 5 Dec 2020 14:43:13 -0800 Subject: [PATCH 1/3] Remove references to VB compiler assemblies --- .../StyleCop.Analyzers.Test.CSharp7.csproj | 2 +- .../StyleCop.Analyzers.Test.CSharp8.csproj | 2 +- .../StyleCop.Analyzers.Test.CSharp9.csproj | 2 +- .../StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj index a3e27b478..d1a849d23 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj @@ -17,7 +17,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/StyleCop.Analyzers.Test.CSharp8.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/StyleCop.Analyzers.Test.CSharp8.csproj index 5a017037f..b2a9e1681 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/StyleCop.Analyzers.Test.CSharp8.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp8/StyleCop.Analyzers.Test.CSharp8.csproj @@ -17,7 +17,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj index cf28b2eed..7dfe9aa71 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj @@ -17,7 +17,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj index 0bb9f212f..70accc5c3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj @@ -17,7 +17,7 @@ - + From 74c46ee2ee0bfb4929a3117b6c1104758ff5a3c2 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 5 Dec 2020 14:44:59 -0800 Subject: [PATCH 2/3] Update to the stable release of Roslyn 3.8.0 --- StyleCop.Analyzers/Directory.Build.props | 4 ++-- .../StyleCop.Analyzers.CodeGeneration.csproj | 2 +- .../StyleCop.Analyzers.Test.CSharp9.csproj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/StyleCop.Analyzers/Directory.Build.props b/StyleCop.Analyzers/Directory.Build.props index 2da11cc69..317aaa757 100644 --- a/StyleCop.Analyzers/Directory.Build.props +++ b/StyleCop.Analyzers/Directory.Build.props @@ -47,12 +47,12 @@ - + - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/StyleCop.Analyzers.CodeGeneration.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/StyleCop.Analyzers.CodeGeneration.csproj index a4892d2cf..07775f8ca 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/StyleCop.Analyzers.CodeGeneration.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/StyleCop.Analyzers.CodeGeneration.csproj @@ -16,7 +16,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj index 7dfe9aa71..4a860f855 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/StyleCop.Analyzers.Test.CSharp9.csproj @@ -17,7 +17,7 @@ - + From e30b94cd94d17a45a7d3674885d825f6cdcf6e41 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 5 Dec 2020 14:49:17 -0800 Subject: [PATCH 3/3] Update to StyleCop.Analyzers 1.2.0-beta.304 --- StyleCop.Analyzers/Directory.Build.props | 2 +- .../Helpers/FixAllContextHelper.cs | 3 ++- .../MaintainabilityRules/SA1404CodeFixProvider.cs | 6 ++++-- .../OrderingRules/SA1206CodeFixProvider.cs | 3 ++- .../SpacingRules/SA1011UnitTests.cs | 9 ++++++--- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/StyleCop.Analyzers/Directory.Build.props b/StyleCop.Analyzers/Directory.Build.props index 317aaa757..a690246ef 100644 --- a/StyleCop.Analyzers/Directory.Build.props +++ b/StyleCop.Analyzers/Directory.Build.props @@ -45,7 +45,7 @@ - + diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/FixAllContextHelper.cs b/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/FixAllContextHelper.cs index da80c3e56..dd9f8ce48 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/FixAllContextHelper.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/FixAllContextHelper.cs @@ -55,7 +55,8 @@ public static async Task AddJustificationToAttributeAsync(context.Document, root, attribute), - nameof(SA1404CodeFixProvider) + "-Add"), diagnostic); + nameof(SA1404CodeFixProvider) + "-Add"), + diagnostic); return; } @@ -60,7 +61,8 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) CodeAction.Create( MaintainabilityResources.SA1404CodeFix, token => UpdateValueOfArgumentAsync(context.Document, root, argument), - nameof(SA1404CodeFixProvider) + "-Update"), diagnostic); + nameof(SA1404CodeFixProvider) + "-Update"), + diagnostic); return; } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/OrderingRules/SA1206CodeFixProvider.cs b/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/OrderingRules/SA1206CodeFixProvider.cs index e70f12221..e4fadf409 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/OrderingRules/SA1206CodeFixProvider.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/OrderingRules/SA1206CodeFixProvider.cs @@ -95,7 +95,8 @@ private static SyntaxTokenList FullySortModifiers(SyntaxTokenList modifiers) return AdjustTrivia( accessModifiers .Concat(staticModifiers) - .Concat(otherModifiers), modifiers); + .Concat(otherModifiers), + modifiers); } /// diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs index d76508dc8..91412277a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1011UnitTests.cs @@ -259,7 +259,8 @@ public async Task TestClosingBracketFollowedByNoSpaceAndIncrementOrDecrementOper { string validStatament = string.Format( @"var i = new int[1]; - i[0]{0};", operatorText); + i[0]{0};", + operatorText); await this.TestWhitespaceInStatementOrDeclAsync(validStatament, null, DiagnosticResult.EmptyDiagnosticResults).ConfigureAwait(false); } @@ -271,11 +272,13 @@ public async Task TestClosingBracketFollowedBySpaceAndIncrementOrDecrementOperat { string invalidStatament = string.Format( @"var i = new int[1]; - i[0] {0};", operatorText); + i[0] {0};", + operatorText); string fixedStatament = string.Format( @"var i = new int[1]; - i[0]{0};", operatorText); + i[0]{0};", + operatorText); DiagnosticResult expected = Diagnostic().WithLocation(8, 16).WithArguments(" not", "followed");