|
1 | 1 | ---
|
2 | 2 | title: "IDE0079: Remove unnecessary suppression"
|
3 | 3 | description: "Learn about code analysis rule IDE0079: Remove unnecessary suppression"
|
4 |
| -ms.date: 03/23/2023 |
| 4 | +ms.date: 12/27/2024 |
5 | 5 | f1_keywords:
|
6 | 6 | - IDE0079
|
7 | 7 | - dotnet_remove_unnecessary_suppression_exclusions
|
@@ -71,15 +71,23 @@ class C2
|
71 | 71 |
|
72 | 72 | Options specify the behavior that you want the rule to enforce. For information about configuring options, see [Option format](language-rules.md#option-format).
|
73 | 73 |
|
| 74 | +> [!NOTE] |
| 75 | +> Setting a severity in the format `option_name = value:severity` doesn't apply to the `dotnet_remove_unnecessary_suppression_exclusions` option and should be avoided. Instead, specify the severity using a separate entry, for example: |
| 76 | +> |
| 77 | +> ```ini |
| 78 | +> dotnet_remove_unnecessary_suppression_exclusions = none |
| 79 | +> dotnet_diagnostic.IDE0079.severity = warning |
| 80 | +> ``` |
| 81 | +
|
74 | 82 | ### dotnet_remove_unnecessary_suppression_exclusions
|
75 | 83 |
|
76 |
| -| Property | Value | Description | |
77 |
| -| ------------------------ | ------------------------------------------------------------------------ | ---------------------------------------------- | |
78 |
| -| **Option name** | dotnet_remove_unnecessary_suppression_exclusions | | |
79 |
| -| **Option values** | `,` separated list of rule IDs or categories (prefixed with `category:`) | Excludes suppressions for the listed rules | |
80 |
| -| | `all` | Disables the rule (all rule IDs excluded) | |
81 |
| -| | `none` | Enables the rule for all rules (no exclusions) | |
82 |
| -| **Default option value** | `none` | | |
| 84 | +| Property | Value | Description | |
| 85 | +|--------------------------|--------------------------------------------------|------------------------------------------------| |
| 86 | +| **Option name** | dotnet_remove_unnecessary_suppression_exclusions | | |
| 87 | +| **Option values** | Comma-separated list of rule IDs or categories (prefixed with `category:`) | Excludes suppressions for the listed rules or categories | |
| 88 | +| | `all` | Disables the rule (all rule IDs excluded) | |
| 89 | +| | `none` | Enables the rule for all rules (no exclusions) | |
| 90 | +| **Default option value** | `none` | | |
83 | 91 |
|
84 | 92 | ```csharp
|
85 | 93 | using System.Diagnostics.CodeAnalysis;
|
|
0 commit comments