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

Check function literals in unused-param #966

Merged
merged 3 commits into from
Jan 27, 2024

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Jan 22, 2024

Closes #965

See #965 for the motivation behind this PR.

  • Added tests
  • I believe this code follows the existing style, but if this could be improved I'm very open to any feedback
  • Passes CI

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.

rule/unused-param.go Outdated Show resolved Hide resolved
@chavacava
Copy link
Collaborator

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 chavacava merged commit f547cb5 into mgechev:master Jan 27, 2024
4 checks passed
@chavacava
Copy link
Collaborator

merged, thanks @StephenButtolph

eikemeier added a commit to fillmore-labs/async-exp that referenced this pull request Feb 9, 2024
eikemeier added a commit to fillmore-labs/async-exp that referenced this pull request Feb 9, 2024
manishym added a commit to manishym/go-ceph that referenced this pull request Feb 13, 2024
revive v1.3.7 added mgechev/revive#966 which
checks for unused parameters in function literals. This caused several
lint errors in go-ceph code.

Signed-off-by: Manish <[email protected]>
mergify bot pushed a commit to ceph/go-ceph that referenced this pull request Feb 13, 2024
revive v1.3.7 added mgechev/revive#966 which
checks for unused parameters in function literals. This caused several
lint errors in go-ceph code.

Signed-off-by: Manish <[email protected]>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand unused-parameter to check anonymous functions
3 participants