Skip to content
Merged
Changes from 2 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
4 changes: 4 additions & 0 deletions docs/fundamentals/code-analysis/quality-rules/ca1801.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ This rule does not examine the following kinds of methods:

This rule does not flag parameters that are named with the [discard](../../../csharp/discards.md) symbol, for example, `_`, `_1`, and `_2`. This reduces warning noise on parameters that are needed for signature requirements, for example, a method used as a delegate, a parameter with special attributes, or a parameter whose value is implicitly accessed at run time by a framework but is not referenced in code.

> [!NOTE]
> This rule has been deprecated in favor of [IDE0060](../style-rules/ide0060.md). You can enforce this analyzer by following [this guide](../overview.md#code-style-analysis).
> For more information, see [Deprecated rules](https://docs.microsoft.com/visualstudio/code-quality/fxcop-unported-deprecated-rules).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Do we need a parallel PR to MicrosoftDocs/visualstudio-docs page?
  • The linked page says deprecated rules for FxCop, which was deleted recently, so the change only affects NetAnalyzers package. Do the linked page needs to be updated regarding this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just suggest leaving this part out for now (for more info, see deprecated rules).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, those deprecated rules refer to FxCop rules that were never ported as an analyzer. CA1801 was ported, so I don't think it belongs in that list.


## Rule description

Review parameters in non-virtual methods that are not used in the method body to make sure no incorrectness exists around failure to access them. Unused parameters incur maintenance and performance costs.
Expand Down