CA1801 false positive on record parameter if any parameter has a default value #4462
Labels
False_Positive
A diagnostic is reported for non-problematic case
help wanted
The issue is up-for-grabs, and can be claimed by commenting
Analyzer
Diagnostic ID: CA1801:
Review unused parameters
Analyzer source
SDK: Built-in CA analyzers in .NET 5 SDK or later
Version: SDK 5.0.100-rc.2
Describe the bug
If any parameter of a positional record has a default value, CA1801 is reported on all parameters.
Steps To Reproduce
Write this code:
Expected behavior
No warning
Actual behavior
CA1801 is reported on all parameters:
Additional context
Looks very similar to #4397
The text was updated successfully, but these errors were encountered: