All rules
IDE0060Parameter preferences MS default: Suggestion

Remove unused parameter

Flag parameters that are never used by the method body.

Microsoft docs

Description

Detects parameters that are never read. The scope is configurable to all parameters or only non-public methods.

Why it matters

Unused parameters are dead weight that mislead callers about what a method actually needs.

Examples

Avoid
int Add(int a, int b, int unused) => a + b;
Prefer
int Add(int a, int b) => a + b;

Configurable options

Vote for the value each option should take in the generated .editorconfig.

dotnet_code_quality_unused_parameters
default: all
Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0