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

feature request: able to disable hugeParam for some structs via .golangci.yaml #1412

Open
134130 opened this issue Apr 6, 2024 · 2 comments

Comments

@134130
Copy link

134130 commented Apr 6, 2024

What?

  • I want to disable hugeParam checking for some structs.
  • It will be great if I can mediate it with .golangci.yaml

Why?

  • hugeParam: logger is heavy (112 bytes); consider passing it by pointer (gocritic) is not proper for all cases.
  • In my case, using github.com/rs/zerolog, all the logger passing methods are not satisfying hugeParam's condition.
  • Also, there is some edge cases for some structs that should be passed by struct, not pointer.
    • I want to disable linter on that struct. not with comment line for all of methods.
@quasilyte
Copy link
Member

Perhaps you can consider increasing the size threshold a bit instead?
Something lint 160 could work for your case.

@134130
Copy link
Author

134130 commented Apr 7, 2024

@quasilyte thx for your reply.
threshold can be another solution, but it'll be great if it can be controlled by each structs! thx.

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

No branches or pull requests

2 participants