-
Notifications
You must be signed in to change notification settings - Fork 172
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
[Wildcard Variables][lint] consider a no_unused_parameters
lint
#4972
Comments
As described here, the lint would conflict with Generally, there can be good reasons for having a name for a parameter that is not used, if the function is publicly visible. The parameter is there for a reason, its name may describe that reason. Not always, it's also fine to decide that you don't care, or that you know that nobody will see this seemingly public function. For function literals, used as a callback, it makes much more sense, because that's not also exposed as something you can call. |
no_unusued_parameters
lintno_unused_parameters
lint
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
GOOD
/fyi @kallentu @lrhn @munificent
The text was updated successfully, but these errors were encountered: