Skip to content
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

proposal: avoid_unused_private_function_parameters #4957

Open
stephane-archer opened this issue Apr 27, 2024 · 2 comments
Open

proposal: avoid_unused_private_function_parameters #4957

stephane-archer opened this issue Apr 27, 2024 · 2 comments

Comments

@stephane-archer
Copy link

does it make any sense to have unused function parameters when the function is private in a class?

class foo {
void _bar(int I) {
print("hello word");
}
}
@lrhn
Copy link
Member

lrhn commented May 3, 2024

Maybe.

If you override the method in subclasses inside the same library, and the other methods use the parameter.

If you tear off the method and pass it to something expecting a parameter.

@stephane-archer
Copy link
Author

Can an optional lint, in that case, could make sense? Not everyone needs to do this and an unused parameters can be hard to spot in your codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants