未验证 提交 2ddd9f25 编写于 作者: S Sam Harwell 提交者: GitHub

Merge pull request #33392 from sharwell/update-formatter

Update formatter
......@@ -30,7 +30,7 @@
<RoslynDiagnosticsNugetPackageVersion>2.6.2-beta2</RoslynDiagnosticsNugetPackageVersion>
<CodeStyleLayerCodeAnalysisVersion>2.8.2</CodeStyleLayerCodeAnalysisVersion>
<MicrosoftCodeAnalysisTestingVersion>1.0.0-beta1-63310-01</MicrosoftCodeAnalysisTestingVersion>
<CodeStyleAnalyzerVersion>2.11.0-beta2-63603-03</CodeStyleAnalyzerVersion>
<CodeStyleAnalyzerVersion>3.1.0-beta1-19113-04</CodeStyleAnalyzerVersion>
<BasicUndoVersion>0.9.3</BasicUndoVersion>
<BenchmarkDotNetVersion>0.11.1</BenchmarkDotNetVersion>
......
......@@ -4174,7 +4174,7 @@ public void Nullable()
parsedArgs = DefaultParse(new[] { @"/nullable", "a.cs" }, WorkingDirectory);
parsedArgs.Errors.Verify(
// error CS8630: Invalid 'nullable' value: 'Enable' for C# 7.3. Please use language version 8.0 or greater.
// error CS8630: Invalid 'nullable' value: 'Enable' for C# 7.3. Please use language version 8.0 or greater.
Diagnostic(ErrorCode.ERR_NullableOptionNotAvailable).WithArguments("nullable", "Enable", "7.3", "8.0").WithLocation(1, 1));
Assert.Equal(NullableContextOptions.Enable, parsedArgs.CompilationOptions.NullableContextOptions);
......
......@@ -1894,7 +1894,7 @@ public void PragmaWarning_EnableSafeOnlyNullable()
#pragma warning safeonly 1695
";
CreateCompilation(text, parseOptions: TestOptions.Regular7_3).VerifyDiagnostics(
// (3,17): warning CS1658: The feature 'warning action enable or safeonly' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.. See also error CS8652.
// #pragma warning enable nullable
Diagnostic(ErrorCode.WRN_ErrorOverride, "enable").WithArguments("The feature 'warning action enable or safeonly' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.", "8652").WithLocation(3, 17),
......@@ -1936,7 +1936,7 @@ public void PragmaWarning_EnableSafeOnlyNullable()
Diagnostic(ErrorCode.WRN_ErrorOverride, "safeonly").WithArguments("The feature 'warning action enable or safeonly' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.", "8652").WithLocation(15, 17),
// (15,26): warning CS8599: Expected nullable
// #pragma warning safeonly 1695
Diagnostic(ErrorCode.WRN_IllegalPPWarningSafeOnly, "1695").WithLocation(15, 26)
Diagnostic(ErrorCode.WRN_IllegalPPWarningSafeOnly, "1695").WithLocation(15, 26)
);
var expected = new DiagnosticDescription[]
......
......@@ -345,7 +345,7 @@ await foreach (var i in collection)
}
";
var tree = SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_3));
tree.GetDiagnostics().Verify(
tree.GetDiagnostics().Verify(
// (6,9): error CS8652: The feature 'async streams' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
// await foreach (var i in collection)
Diagnostic(ErrorCode.ERR_FeatureInPreview, "await").WithArguments("async streams").WithLocation(6, 9)
......
......@@ -2122,7 +2122,7 @@ public void RecursivePattern_01()
[Fact]
public void BrokenPattern_06()
{
UsingStatement(@"switch (e) { case (: ; }", TestOptions.RegularWithoutRecursivePatterns,
UsingStatement(@"switch (e) { case (: ; }", TestOptions.RegularWithoutRecursivePatterns,
// (1,19): error CS8652: The feature 'recursive patterns' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
// switch (e) { case (: ; }
Diagnostic(ErrorCode.ERR_FeatureInPreview, "(: ").WithArguments("recursive patterns").WithLocation(1, 19),
......
......@@ -171,7 +171,7 @@ private static bool CaretIsInForStatementCondition(int caretPosition, ForStateme
// we will have bailed earlier due to not being inside supported delimiters
=> forStatementSyntax.Condition == null ?
false :
caretPosition > forStatementSyntax.Condition.SpanStart &&
caretPosition > forStatementSyntax.Condition.SpanStart &&
caretPosition < forStatementSyntax.Condition.Span.End;
private static bool CaretIsInForStatementDeclaration(int caretPosition, ForStatementSyntax forStatementSyntax)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册