Each code analysis rule belongs to a category of rules. For example, design rules support adherence to the .NET design guidelines, and security rules help prevent security flaws. You can configure the severity level for an entire category of rules. You can also configure additional options on a per-category basis.
The following table shows the different code analysis rule categories and provides a link to the rules in each category. It also lists the configuration value to use in an EditorConfig file to bulk-configure rule severity on a per-category basis. For example, to set the severity of security rule violations to be errors, the EditorConfig entry is dotnet_analyzer_diagnostic.category-Security.severity = error.
Tip
Setting the severity for a category of rules using the dotnet_analyzer_diagnostic.category-<category>.severity syntax doesn't apply to rules that are disabled by default. However, starting in .NET 6, you can use the AnalysisMode<Category> project property to enable all the rules in a category.
* Use the EditorConfig value dotnet_analyzer_diagnostic.category-CodeQuality.severity to enable the following rules: IDE0051, IDE0052, IDE0064, and IDE0076. While these rules start with "IDE", they aren't technically part of the Style category.
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.