-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-new-language-featurelinter-status-pendingtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
With wildcard variables, we have a proper way to mark unused parameters as intentionally unused. Given that, we might consider a lint that flags unused parameters with the expectation that intentionally unused params should either be removed or converted to wildcards.
For example:
BAD
int f(int x) => 42;
abstract class A {
int f(int x);
}
class A extends C {
@override
int f(int x) => 42;
}
GOOD
int f(int x) => x;
int f() => 42;
int f(int _) => 42;
abstract class A {
int f(int x);
}
class A extends C {
@override
int f(int x) => x;
}
class A extends C {
@override
int f(int _) => 42;
}
/fyi @kallentu @lrhn @munificent
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposallinter-new-language-featurelinter-status-pendingtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug