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

How To Pass Flags to staticcheck Command #11

Open
muya opened this issue Oct 12, 2022 · 0 comments
Open

How To Pass Flags to staticcheck Command #11

muya opened this issue Oct 12, 2022 · 0 comments

Comments

@muya
Copy link

muya commented Oct 12, 2022

The staticcheck command provides options to pass in flags like -tags (to specify which build flags to use) - more examples here: https://staticcheck.io/docs/running-staticcheck/cli/

So it's possible to run:

staticcheck -tags=mybuildtag ./...

How can one pass similar tags to the pre-commit hook?

Options tried

      - id: go-static-check
        args:
          - "-tags=mybuildtag"

However, it seems these are parsed as directory options.

Any guidance would be highly appreciated, thanks!

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

1 participant