Open jordanlewis opened 3 years ago
Interesting.
I think it's a problem with a go/analysis
there, because I don't load any pacakges on my own.
The main function just calls a "framework" to do its thing.
I wonder if this issue persists when ruleguard is used via golangci-lint?
The error you're seeing is probably comes from here: https://github.com/golang/tools/blob/d88ec18c69c70d818214bd2c98f3ce431ea4fd62/go/analysis/internal/checker/checker.go#L159
Would it be possible to ignore such errors?
That would require the main function rewrite as it uses "singlechecker" helper from the framework to do all the work. If golangci-lint does solve that problem, it would be easier to use ruleguard from that (as golangci-lint does include it).
There are so many unfortunate things that co go wrong when trying to "load" Go packages. :( Go modules made the picture slightly more problematic for the tool writers from one point of view (as the number of different options is now higher, not lower).
Currently,
ruleguard
appears to exit early when encountering any cgo files. Here's an example against https://github.com/cockroachdb/cockroach:Would it be possible to ignore such errors?
Thanks for the great tool!