Skip to content

Add note about option format #44098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 31, 2024
Merged
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
24 changes: 16 additions & 8 deletions docs/fundamentals/code-analysis/style-rules/ide0079.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "IDE0079: Remove unnecessary suppression"
description: "Learn about code analysis rule IDE0079: Remove unnecessary suppression"
ms.date: 03/23/2023
ms.date: 12/27/2024
f1_keywords:
- IDE0079
- dotnet_remove_unnecessary_suppression_exclusions
Expand Down Expand Up @@ -71,15 +71,23 @@ class C2

Options specify the behavior that you want the rule to enforce. For information about configuring options, see [Option format](language-rules.md#option-format).

> [!NOTE]
> 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:
>
> ```ini
> dotnet_remove_unnecessary_suppression_exclusions = none
> dotnet_diagnostic.IDE0079.severity = warning
> ```

### dotnet_remove_unnecessary_suppression_exclusions

| Property | Value | Description |
| ------------------------ | ------------------------------------------------------------------------ | ---------------------------------------------- |
| **Option name** | dotnet_remove_unnecessary_suppression_exclusions | |
| **Option values** | `,` separated list of rule IDs or categories (prefixed with `category:`) | Excludes suppressions for the listed rules |
| | `all` | Disables the rule (all rule IDs excluded) |
| | `none` | Enables the rule for all rules (no exclusions) |
| **Default option value** | `none` | |
| Property | Value | Description |
|--------------------------|--------------------------------------------------|------------------------------------------------|
| **Option name** | dotnet_remove_unnecessary_suppression_exclusions | |
| **Option values** | Comma-separated list of rule IDs or categories (prefixed with `category:`) | Excludes suppressions for the listed rules or categories |
| | `all` | Disables the rule (all rule IDs excluded) |
| | `none` | Enables the rule for all rules (no exclusions) |
| **Default option value** | `none` | |

```csharp
using System.Diagnostics.CodeAnalysis;
Expand Down
Loading