Open alexeagle opened 2 months ago
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 only-new-issues: true
. I wonder if that strategy can be applied here. Let the linter have access to all source files but cull the reported errors to just those affected by a git diff.
Doesn't work with our design here that lints are just actions that visit the go_library
graph and rely on Bazel's action caching (and remote execution).
Having git information available to the linter would make it non-hermetic and not follow that design.
But let's chat, maybe there's a middle path here I'm not seeing.
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!
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.