Search code examples
gogolint

How to ignore test files(_test.go) using go/analysis?


How to ignore test files(_test.go) using go/analysis? It seems like that go/analysis load test files by default.


Solution

  • 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.