Automate detection of code issues in files excluded by go tags #17085
Labels
ci
enhancement
Stalled
Team:Automation
Label for the Observability productivity team
Team:Integrations
Label for the Integrations team
:Testing
Describe the enhancement:
mage check
runsgo vet
on all files, but this takes into account build tags, so files excluded are not analyzed. This happens for example with integration tests. This doesn't happen with other test files becausego vet
also analyzes test files.go vet -tags=integration
can be used to analyze also integration test files.This is usually not a problem because all files are included in some build or executed in some test. But for example #17062 was introduced in #16937 and was not detected by CI.
We could introduce something like a list of combinations of build tags to pass to
go vet
.Describe a specific use case for the enhancement or feature:
We have started to introduce tests that are not executed in all builds, these tests are excluded using build tags. Without automatic checks for these files we can introduce issues in PRs that wouldn't be dectected till some specific build is executed.
The text was updated successfully, but these errors were encountered: