Skip to content

Commit 0878d9b

Browse files
committed
Update wording to reflect rule severity
Fixes #2036 Fixes #2272
1 parent 1f8c520 commit 0878d9b

198 files changed

Lines changed: 695 additions & 695 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

StyleCop.Analyzers/StyleCop.Analyzers.Test/Helpers/UseCultureAttribute.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public class UseCultureAttribute : BeforeAfterTestAttribute
2525
{
2626
private readonly Lazy<CultureInfo> culture;
2727

28-
#pragma warning disable SA1305 // Field names must not use Hungarian notation
28+
#pragma warning disable SA1305 // Field names should not use Hungarian notation
2929
private readonly Lazy<CultureInfo> uiCulture;
30-
#pragma warning restore SA1305 // Field names must not use Hungarian notation
30+
#pragma warning restore SA1305 // Field names should not use Hungarian notation
3131

3232
private CultureInfo originalCulture;
3333

@@ -49,15 +49,15 @@ public UseCultureAttribute(string culture)
4949
{
5050
}
5151

52-
#pragma warning disable SA1305 // Field names must not use Hungarian notation
52+
#pragma warning disable SA1305 // Field names should not use Hungarian notation
5353
/// <summary>
5454
/// Initializes a new instance of the <see cref="UseCultureAttribute"/>
5555
/// class with a culture and a UI culture.
5656
/// </summary>
5757
/// <param name="culture">The name of the culture.</param>
5858
/// <param name="uiCulture">The name of the UI culture.</param>
5959
public UseCultureAttribute(string culture, string uiCulture)
60-
#pragma warning restore SA1305 // Field names must not use Hungarian notation
60+
#pragma warning restore SA1305 // Field names should not use Hungarian notation
6161
{
6262
this.culture = new Lazy<CultureInfo>(() => new CultureInfo(culture));
6363
this.uiCulture = new Lazy<CultureInfo>(() => new CultureInfo(uiCulture));

StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1509UnitTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,9 +860,9 @@ public async Task TestInterfaceDeclarationWithSurroundingPragmasAsync()
860860
namespace TestNamespace
861861
{
862862
863-
#pragma warning disable SA1302 // Interface names must begin with I
863+
#pragma warning disable SA1302 // Interface names should begin with I
864864
public interface ActiveConfiguredProject<out T>
865-
#pragma warning restore SA1302 // Interface names must begin with I
865+
#pragma warning restore SA1302 // Interface names should begin with I
866866
{
867867
/// <summary>
868868
/// Gets the ConfiguredProject exported value.

StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1516UnitTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Foo { }
8080
[Fact]
8181
public void DiagnosticMessageFormatIsCorrect()
8282
{
83-
Assert.Equal("Elements must be separated by blank line", this.GetCSharpDiagnosticAnalyzers().Single().SupportedDiagnostics.Single().MessageFormat.ToString());
83+
Assert.Equal("Elements should be separated by blank line", this.GetCSharpDiagnosticAnalyzers().Single().SupportedDiagnostics.Single().MessageFormat.ToString());
8484
}
8585

8686
[Fact]

StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/SA1202UnitTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ string IA.T
788788
get { return null; }
789789
}
790790
791-
// SA1202 (All public properties must come before all private properties) wrongly reported here.
791+
// SA1202 (All public properties should come before all private properties) wrongly reported here.
792792
public int W { get; set; }
793793
794794
protected string S { get; set; }
@@ -846,7 +846,7 @@ string IA.T
846846
get { return null; }
847847
}
848848
849-
// SA1202 (All public properties must come before all private properties) wrongly reported here.
849+
// SA1202 (All public properties should come before all private properties) wrongly reported here.
850850
public int W { get; set; }
851851
852852
// SA1202 should be reported here (according to legacy StyleCop), but is not.

StyleCop.Analyzers/StyleCop.Analyzers.Test/OrderingRules/UsingCodeFixProviderRegressionUnitTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public async Task VerifyRegressionFor2026Async()
4545
4646
namespace Microsoft.VisualStudio.Shell
4747
{
48-
#pragma warning disable SA1200 // Using directives must be placed correctly
48+
#pragma warning disable SA1200 // Using directives should be placed correctly
4949
// This is required to work around accessibility issues in documentation comments.
5050
using NativeMethods = System;
51-
#pragma warning restore SA1200 // Using directives must be placed correctly
51+
#pragma warning restore SA1200 // Using directives should be placed correctly
5252
}
5353
5454
#endif
@@ -73,10 +73,10 @@ namespace Microsoft.VisualStudio.Shell
7373
7474
namespace Microsoft.VisualStudio.Shell
7575
{
76-
#pragma warning disable SA1200 // Using directives must be placed correctly
76+
#pragma warning disable SA1200 // Using directives should be placed correctly
7777
// This is required to work around accessibility issues in documentation comments.
7878
using NativeMethods = System;
79-
#pragma warning restore SA1200 // Using directives must be placed correctly
79+
#pragma warning restore SA1200 // Using directives should be placed correctly
8080
}
8181
8282
#endif

StyleCop.Analyzers/StyleCop.Analyzers.Test/SpacingRules/SA1024UnitTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private int Bar(int value)
213213
}
214214

215215
/// <summary>
216-
/// Verifies that the analyzer will produce the proper diagnostics when the colons must not preceded by space.
216+
/// Verifies that the analyzer will produce the proper diagnostics when the colons should not preceded by space.
217217
/// </summary>
218218
/// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
219219
[Fact]

StyleCop.Analyzers/StyleCop.Analyzers/AnalyzerConstants.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static AnalyzerConstants()
2929
/// to disable a diagnostic which is currently untested.
3030
/// </value>
3131
[ExcludeFromCodeCoverage]
32-
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation must match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")]
32+
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation should match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")]
3333
internal static bool DisabledNoTests { get; }
3434

3535
/// <summary>
@@ -44,7 +44,7 @@ static AnalyzerConstants()
4444
/// to indicate that the diagnostic is disabled by default because it is an alternative to a reference StyleCop
4545
/// rule.
4646
/// </value>
47-
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation must match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")]
47+
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation should match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")]
4848
internal static bool DisabledAlternative => false;
4949

5050
/// <summary>
@@ -57,7 +57,7 @@ static AnalyzerConstants()
5757
/// <see cref="DiagnosticDescriptor(string, string, string, string, DiagnosticSeverity, bool, string, string, string[])"/>
5858
/// to indicate that the diagnostic should be enabled by default.
5959
/// </value>
60-
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation must match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")]
60+
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation should match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")]
6161
internal static bool EnabledByDefault => true;
6262

6363
/// <summary>
@@ -70,7 +70,7 @@ static AnalyzerConstants()
7070
/// <see cref="DiagnosticDescriptor(string, string, string, string, DiagnosticSeverity, bool, string, string, string[])"/>
7171
/// to indicate that the diagnostic should be disabled by default.
7272
/// </value>
73-
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation must match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")]
73+
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation should match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")]
7474
internal static bool DisabledByDefault => false;
7575
}
7676
}

0 commit comments

Comments
 (0)