diff --git a/README.md b/README.md index f340dd81..a88f5f46 100755 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ If you are already using other analyzers, you can check [which rules are duplica |[MA0161](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0161.md)|Usage|UseShellExecute must be explicitly set|ℹ️|❌|❌| |[MA0162](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0162.md)|Usage|Use Process.Start overload with ProcessStartInfo|ℹ️|❌|❌| |[MA0163](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0163.md)|Usage|UseShellExecute must be false when redirecting standard input or output|⚠️|✔️|❌| -|[MA0164](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0164.md)|Style|Use parentheses to not pattern clearer|⚠️|✔️|✔️| +|[MA0164](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0164.md)|Style|Use parentheses to make not pattern clearer|⚠️|✔️|✔️| diff --git a/docs/README.md b/docs/README.md index 07e0e367..b408b807 100755 --- a/docs/README.md +++ b/docs/README.md @@ -163,7 +163,7 @@ |[MA0161](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0161.md)|Usage|UseShellExecute must be explicitly set|ℹ️|❌|❌| |[MA0162](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0162.md)|Usage|Use Process.Start overload with ProcessStartInfo|ℹ️|❌|❌| |[MA0163](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0163.md)|Usage|UseShellExecute must be false when redirecting standard input or output|⚠️|✔️|❌| -|[MA0164](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0164.md)|Style|Use parentheses to not pattern clearer|⚠️|✔️|✔️| +|[MA0164](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0164.md)|Style|Use parentheses to make not pattern clearer|⚠️|✔️|✔️| |Id|Suppressed rule|Justification| |--|---------------|-------------| @@ -661,7 +661,7 @@ dotnet_diagnostic.MA0162.severity = none # MA0163: UseShellExecute must be false when redirecting standard input or output dotnet_diagnostic.MA0163.severity = warning -# MA0164: Use parentheses to not pattern clearer +# MA0164: Use parentheses to make not pattern clearer dotnet_diagnostic.MA0164.severity = warning ``` @@ -1154,6 +1154,6 @@ dotnet_diagnostic.MA0162.severity = none # MA0163: UseShellExecute must be false when redirecting standard input or output dotnet_diagnostic.MA0163.severity = none -# MA0164: Use parentheses to not pattern clearer +# MA0164: Use parentheses to make not pattern clearer dotnet_diagnostic.MA0164.severity = none ``` diff --git a/docs/Rules/MA0164.md b/docs/Rules/MA0164.md index 12bfeb87..b06cddb5 100644 --- a/docs/Rules/MA0164.md +++ b/docs/Rules/MA0164.md @@ -1,4 +1,4 @@ -# MA0164 - Use parentheses to not pattern clearer +# MA0164 - Use parentheses to make not pattern clearer `not` patterns are often wrongly used in combination with the `or` operator. This rule suggests using parentheses to make evaluation order clearer. diff --git a/src/Meziantou.Analyzer/Rules/NotPatternShouldBeParenthesizedAnalyzer.cs b/src/Meziantou.Analyzer/Rules/NotPatternShouldBeParenthesizedAnalyzer.cs index 2381eee1..64268e87 100644 --- a/src/Meziantou.Analyzer/Rules/NotPatternShouldBeParenthesizedAnalyzer.cs +++ b/src/Meziantou.Analyzer/Rules/NotPatternShouldBeParenthesizedAnalyzer.cs @@ -12,8 +12,8 @@ public sealed class NotPatternShouldBeParenthesizedAnalyzer : DiagnosticAnalyzer { private static readonly DiagnosticDescriptor Rule = new( RuleIdentifiers.NotPatternShouldBeParenthesized, - title: "Use parentheses to not pattern clearer", - messageFormat: "Use parentheses to make it clearer", + title: "Use parentheses to make not pattern clearer", + messageFormat: "Use parentheses to make not pattern clearer", RuleCategories.Style, DiagnosticSeverity.Warning, isEnabledByDefault: true,