Skip to content

Commit

Permalink
Fix #2788: Improve description to avoid confusion about the possible …
Browse files Browse the repository at this point in the history
…fixes.
  • Loading branch information
tom-englert committed Oct 3, 2023
1 parent 47486a9 commit 79ccead
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/xunit.analyzers.tests/Utility/CSharpVerifier.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
Expand Down Expand Up @@ -812,6 +813,9 @@ protected TestBase(

// Diagnostics are reported in both normal and generated code
TestBehaviors |= TestBehaviors.SkipGeneratedCodeCheck;

// Tests that check for messages should run independent of current system culture.
CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;
}

public LanguageVersion LanguageVersion { get; }
Expand Down
4 changes: 2 additions & 2 deletions src/xunit.analyzers/Utility/Descriptors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ static DiagnosticDescriptor Rule(
public static DiagnosticDescriptor X1030_DoNotUseConfigureAwait { get; } =
Rule(
"xUnit1030",
"Do not call ConfigureAwait in test method",
"Do not call ConfigureAwait(false) in test method",
Usage,
Warning,
"Test methods should not call ConfigureAwait(), as it may bypass parallelization limits."
"Test methods should not call ConfigureAwait(false), as it may bypass parallelization limits. Omit ConfigureAwait, or use ConfigureAwait(true) to avoid CA2007."
);

public static DiagnosticDescriptor X1031_DoNotUseBlockingTaskOperations { get; } =
Expand Down

0 comments on commit 79ccead

Please sign in to comment.