Skip to content

Commit 8ee2404

Browse files
authored
Merge pull request #3255 from NextTurn/sa1000
Specify exact language versions
2 parents 78eff0d + 793fd78 commit 8ee2404

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/OrderingRules/SA1206CSharp7UnitTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public async Task TestReadonlyRefKeywordInStructDeclarationAsync(string keywords
3232
}}
3333
}}
3434
";
35-
await VerifyCSharpDiagnosticAsync(LanguageVersion.Latest, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
35+
await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_2, testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(false);
3636
}
3737

3838
[Fact]
@@ -51,7 +51,7 @@ readonly private struct BitHelper
5151
{
5252
Diagnostic().WithLocation(3, 14).WithArguments("private", "readonly"),
5353
};
54-
await VerifyCSharpDiagnosticAsync(LanguageVersion.Latest, testCode, expected, CancellationToken.None).ConfigureAwait(false);
54+
await VerifyCSharpDiagnosticAsync(LanguageVersion.CSharp7_2, testCode, expected, CancellationToken.None).ConfigureAwait(false);
5555
}
5656
}
5757
}

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/ReadabilityRules/SA1131CSharp7UnitTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct TestStruct
5656
}}
5757
";
5858
DiagnosticResult expected = Diagnostic().WithLocation(8, 18);
59-
await VerifyCSharpFixAsync(LanguageVersion.Latest, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false);
59+
await VerifyCSharpFixAsync(LanguageVersion.CSharp7_1, testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false);
6060
}
6161
}
6262
}

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/SpacingRules/SA1000CSharp9UnitTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public async Task TestTargetTypedNewAsync()
1616
{
1717
string statementWithoutSpace = "int a = new();";
1818

19-
await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace, languageVersion: LanguageVersion.Preview).ConfigureAwait(false);
19+
await this.TestKeywordStatementAsync(statementWithoutSpace, DiagnosticResult.EmptyDiagnosticResults, statementWithoutSpace, languageVersion: LanguageVersion.CSharp9).ConfigureAwait(false);
2020
}
2121
}
2222
}

0 commit comments

Comments
 (0)