From eb0a081d580a550c3ae9fd77b4332c47bcb14b45 Mon Sep 17 00:00:00 2001 From: tpodolak Date: Sun, 17 Feb 2019 01:14:54 +0100 Subject: [PATCH] [GH-66] - adjusting diagnostic category name --- documentation/rules/NS1000.md | 4 ++-- documentation/rules/NS1001.md | 4 ++-- documentation/rules/NS1002.md | 4 ++-- documentation/rules/NS1003.md | 8 ++++---- src/NSubstitute.Analyzers.Shared/DiagnosticCategories.cs | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/documentation/rules/NS1000.md b/documentation/rules/NS1000.md index 609a7912..84c20064 100644 --- a/documentation/rules/NS1000.md +++ b/documentation/rules/NS1000.md @@ -7,7 +7,7 @@ Category - Non virtual substitution + Non-substitutable member @@ -36,7 +36,7 @@ To fix a violation of this rule, make the member of your class virtual or substi This warning can be suppressed by disabling the warning in the **ruleset** file for the project or by suppressing it (for selected members) in `nsubstitute.json` file. See the [configuration](../Configuration.md) section for details on how to set this up. The warning can also be suppressed programmatically for an assembly: ````c# -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Non virtual substitution", "NS1000:Non-virtual setup specification.", Justification = "Reviewed")] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Non-substitutable member", "NS1000:Non-virtual setup specification.", Justification = "Reviewed")] ```` Or for a specific code block: diff --git a/documentation/rules/NS1001.md b/documentation/rules/NS1001.md index 89547f9e..0395a169 100644 --- a/documentation/rules/NS1001.md +++ b/documentation/rules/NS1001.md @@ -7,7 +7,7 @@ Category - Non virtual substitution + Non-substitutable member @@ -34,7 +34,7 @@ To fix a violation of this rule, make the member of your class virtual or substi This warning can be suppressed by disabling the warning in the **ruleset** file for the project. The warning can also be suppressed programmatically for an assembly: ````c# -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Non virtual substitution", "NS1001:Non-virtual setup specification.", Justification = "Reviewed")] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Non-substitutable member", "NS1001:Non-virtual setup specification.", Justification = "Reviewed")] ```` Or for a specific code block: diff --git a/documentation/rules/NS1002.md b/documentation/rules/NS1002.md index 6a29a938..863425d5 100644 --- a/documentation/rules/NS1002.md +++ b/documentation/rules/NS1002.md @@ -7,7 +7,7 @@ Category - Non virtual substitution + Non-substitutable member @@ -32,7 +32,7 @@ To fix a violation of this rule, make the member of your class virtual or substi This warning can be suppressed by disabling the warning in the **ruleset** file for the project. The warning can also be suppressed programmatically for an assembly: ````c# -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Non virtual substitution", "NS1002:Non-virtual setup specification.", Justification = "Reviewed")] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Non-substitutable member", "NS1002:Non-virtual setup specification.", Justification = "Reviewed")] ```` Or for a specific code block: diff --git a/documentation/rules/NS1003.md b/documentation/rules/NS1003.md index 2581b349..c4d083ce 100644 --- a/documentation/rules/NS1003.md +++ b/documentation/rules/NS1003.md @@ -7,7 +7,7 @@ Category - Non virtual substitution + Non-substitutable member @@ -35,12 +35,12 @@ There are several ways to fix this: This warning can be suppressed by disabling the warning in the **ruleset** file for the project. The warning can also be suppressed programmatically for an assembly: ````c# -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Non virtual substitution", "NS1003:Non-virtual setup specification.", Justification = "Reviewed")] +[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Non-substitutable member", "NS1003:Intdernal virtual setup specification.", Justification = "Reviewed")] ```` Or for a specific code block: ````c# -#pragma warning disable NS1003 // Non-virtual setup specification. +#pragma warning disable NS1003 // Internal virtual setup specification. // the code which produces warning -#pragma warning restore NS1003 // Non-virtual setup specification. +#pragma warning restore NS1003 // Internal virtual setup specification. ```` diff --git a/src/NSubstitute.Analyzers.Shared/DiagnosticCategories.cs b/src/NSubstitute.Analyzers.Shared/DiagnosticCategories.cs index b92df322..f8aa6a66 100644 --- a/src/NSubstitute.Analyzers.Shared/DiagnosticCategories.cs +++ b/src/NSubstitute.Analyzers.Shared/DiagnosticCategories.cs @@ -2,7 +2,7 @@ { internal enum DiagnosticCategory { - [DisplayName("Non virtual substitution")] + [DisplayName("Non-substitutable member")] NonVirtualSubstitution = 1, [DisplayName("Substitute creation")]