mgechev / revive

🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
https://revive.run
MIT License
4.69k stars 269 forks source link

Check function literals in `unused-param` #966

Closed StephenButtolph closed 5 months ago

StephenButtolph commented 5 months ago

Closes #965

See #965 for the motivation behind this PR.

This does potentially significantly change the performance of this rule because we will now walk into the function bodies. If we are concerned about a performance regression here I think an alternative could be to either add a new rule or add a configuration to the rule to gate checking anonymous functions.

chavacava commented 5 months ago

Hi @StephenButtolph, thanks for the PR and the proposal for improving the rule. I'll try to review the PR in the coming days.

chavacava commented 5 months ago

merged, thanks @StephenButtolph