How to ignore test files(_test.go) using go/analysis? It seems like that go/analysis load test files by default.
How to ignore test files(_test.go) using go/analysis?
852 Views Asked by zsh.sec At
2
There are 2 best solutions below
1
On
This was mentioned in Oct. 2020 with golang/go issue 41771:
It was discussed in leighmcculloch/gochecknoglobals PR 16, but so far (Sept. 2021), without any clear resolution.
Singlechecker assumes tests are enabled by default and -test=false disables them.