-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
add unparam linter #5742
add unparam linter #5742
Conversation
Hmm, I think most of these are there to leave the option open for later changes. I think these warning and error param/return are harmless as-is and slightly annoying to re-introduce if we find we need them when adding new code, so I think we can leave it in. |
works for me :) |
What did this do, exactly? Only had time for a quick scan so far, but I mostly see reordered imports -- where are the param changes? |
@mholt see |
@francislavoie That looks like it was deleting parameters... which I agree we shouldn't do. I am talking about renaming them to The more I think about it, the more I think it needs to be case-by-case basis. Sometimes it's obvious (for example, contexts), other times, it's just an So probably best to leave the params un-linted for now. |
Renaming to |
Oh. I got mixed up. Thanks. |
This PR adds the unparam linter to caddy.
The result was getting rid of several parameters that were never used, and some situations where
we would return an error, where errors could never be triggered.
Note: this should not be merged before #5708