-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
[FR]: lint Go code #208
Comments
In prior projects, I've used the github action provided by golang ci lint itself which supports its own only report only new issues implementation via |
Doesn't work with our design here that lints are just actions that visit the |
I think it is worth trying to run a nogo binary as rules_lint compatible linter as opposed to trying to coerce golangci-lint to work in a Bazel way. You can run all the same analyzers with nogo that you can run under golangci-lint. This is the approach that gVisor takes: https://github.com/google/gvisor/blob/master/tools/nogo/defs.bzl |
Ooh that example should be really helpful, thanks! |
This is one of our primary issues adopting bazel at the moment. We've kinda started wrapping around most of the golangci-lint linters (and, unfortunately, it's really hard to get the exact golangci-lint behavior by just doing this, since there's a lot of sensible defaults golangci-lint applies) |
Have you tried https://github.com/sluongng/nogo-analyzer? It gets you very close to what |
I have, unfortunately its not really what I'm looking for. For example: https://github.com/sluongng/nogo-analyzer/blob/master/goci-lint/errcheck/analyzer.go just brings in the errcheck analyzer, which isn't exactly what the golangci-lint project is doing. Beyond that I think that's not a Honestly, I also much prefer how aspect rules_lint works compare to how nogo does it. I feel like given enough linters, nogo is going to really slow down builds. Also, no autofix support :( |
We'd love to move golangci-lint to bazel, but continue to run the GitHub Action in the meantime. 🤞 |
What is the current behavior?
With #207 we no longer have any Go linters.
Describe the feature
#137 and #129 were bugs when golangci-lint was in this repo, those need to be solved for a roll-forward.
The text was updated successfully, but these errors were encountered: