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
11 changes: 10 additions & 1 deletion docs/fundamentals/code-analysis/code-quality-rule-options.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
---
title: Code quality rule configuration options
description: Learn how to specify additional configuration options for code quality rules.
ms.date: 09/24/2020
ms.date: 06/09/2022
no-loc: ["EditorConfig"]
---
# Code quality rule configuration options

The *code quality* rules have additional configuration options, besides just [configuring their severity](configuration-options.md#severity-level). For example, each code quality analyzer can be configured to only apply to specific parts of your codebase. You specify these options by adding key-value pairs to the same [EditorConfig](https://editorconfig.org) file where you specify rule severities and general editor preferences.

> [!NOTE]
> This article does not detail how to configure a rule's severity. The *.editorconfig* option to set a rule's severity has a different prefix (`dotnet_diagnostic`) to the options described here (`dotnet_code_quality`). In addition, the options described here pertain to code quality rules only, whereas the severity option applies to code style rules as well. As a quick reference, you can configure a rule's severity using the following option syntax:
>
> ```ini
> dotnet_diagnostic.<rule ID>.severity = <severity value>
> ```
>
> However, for detailed information about configuring rule severity, see [Severity level](configuration-options.md#severity-level).

## Option scopes

Each refining option can be configured for all rules, for a category of rules (for example, Security or Design), or for a specific rule.
Expand Down
4 changes: 2 additions & 2 deletions docs/fundamentals/code-analysis/suppress-warnings.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Suppress code analysis warnings
description: Learn the different ways you can suppress .NET code analysis violations.
ms.date: 01/28/2021
ms.date: 06/09/2022
ms-topic: how-to
dev_langs:
- CSharp
Expand All @@ -12,7 +12,7 @@ helpviewer_keywords:
---
# How to suppress code analysis warnings

This article covers the various ways you can suppress warnings from code analysis when you build your .NET app.
This article covers the various ways you can suppress warnings from code analysis when you build your .NET app. You can suppress code quality rules, code style rules, and third-party analyzer rules using the information provided here.

> [!TIP]
> If you're using Visual Studio as your development environment, the *light bulb* menu provides options that generate the code to suppress warnings for you. For more information, see [Suppress violations](/visualstudio/code-quality/use-roslyn-analyzers?#suppress-violations).
Expand Down