Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ If you are already using other analyzers, you can check [which rules are duplica
|[MA0189](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0189.md)|Design|Use InlineArray instead of fixed-size buffers|ℹ️|✔️|✔️|
|[MA0190](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0190.md)|Design|Use partial property instead of partial method for GeneratedRegex|ℹ️|✔️|✔️|
|[MA0191](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0191.md)|Design|Do not use the null-forgiving operator|⚠️|❌|❌|
|[MA0192](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0192.md)|Usage|Use HasFlag instead of bitwise checks|ℹ️||✔️|
|[MA0192](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0192.md)|Usage|Use HasFlag instead of bitwise checks|ℹ️|✔️|✔️|
|[MA0193](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0193.md)|Usage|Use an overload with a MidpointRounding argument|ℹ️|✔️|✔️|
|[MA0194](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0194.md)|Usage|Merge is expressions on the same value|ℹ️|✔️|✔️|
|[MA0195](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0195.md)|Usage|Do not use static fields before they are initialized|⚠️|✔️|❌|
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
|[MA0189](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0189.md)|Design|Use InlineArray instead of fixed-size buffers|<span title='Info'>ℹ️</span>|✔️|✔️|
|[MA0190](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0190.md)|Design|Use partial property instead of partial method for GeneratedRegex|<span title='Info'>ℹ️</span>|✔️|✔️|
|[MA0191](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0191.md)|Design|Do not use the null-forgiving operator|<span title='Warning'>⚠️</span>|❌|❌|
|[MA0192](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0192.md)|Usage|Use HasFlag instead of bitwise checks|<span title='Info'>ℹ️</span>||✔️|
|[MA0192](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0192.md)|Usage|Use HasFlag instead of bitwise checks|<span title='Info'>ℹ️</span>|✔️|✔️|
|[MA0193](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0193.md)|Usage|Use an overload with a MidpointRounding argument|<span title='Info'>ℹ️</span>|✔️|✔️|
|[MA0194](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0194.md)|Usage|Merge is expressions on the same value|<span title='Info'>ℹ️</span>|✔️|✔️|
|[MA0195](https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0195.md)|Usage|Do not use static fields before they are initialized|<span title='Warning'>⚠️</span>|✔️|❌|
Expand Down Expand Up @@ -788,7 +788,7 @@ dotnet_diagnostic.MA0190.severity = suggestion
dotnet_diagnostic.MA0191.severity = none

# MA0192: Use HasFlag instead of bitwise checks
dotnet_diagnostic.MA0192.severity = none
dotnet_diagnostic.MA0192.severity = suggestion

# MA0193: Use an overload with a MidpointRounding argument
dotnet_diagnostic.MA0193.severity = suggestion
Expand Down
8 changes: 0 additions & 8 deletions docs/Rules/MA0192.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,3 @@ bool M(MyEnum value)
return value.HasFlag(MyEnum.Flag1);
}
````

## Configuration

This rule is disabled by default. To enable it, add the following to your `.editorconfig` file:

````editorconfig
dotnet_diagnostic.MA0192.severity = suggestion
````
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ dotnet_diagnostic.MA0190.severity = suggestion
dotnet_diagnostic.MA0191.severity = none

# MA0192: Use HasFlag instead of bitwise checks
dotnet_diagnostic.MA0192.severity = none
dotnet_diagnostic.MA0192.severity = suggestion

# MA0193: Use an overload with a MidpointRounding argument
dotnet_diagnostic.MA0193.severity = suggestion
Expand Down
2 changes: 1 addition & 1 deletion src/Meziantou.Analyzer/Rules/UseHasFlagMethodAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class UseHasFlagMethodAnalyzer : DiagnosticAnalyzer
messageFormat: "Use HasFlag instead of bitwise checks",
RuleCategories.Usage,
DiagnosticSeverity.Info,
isEnabledByDefault: false,
isEnabledByDefault: true,
description: "",
helpLinkUri: RuleIdentifiers.GetHelpUri(RuleIdentifiers.UseHasFlagMethod));

Expand Down
Loading