Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate detection of code issues in files excluded by go tags #17085

Closed
jsoriano opened this issue Mar 18, 2020 · 3 comments
Closed

Automate detection of code issues in files excluded by go tags #17085

jsoriano opened this issue Mar 18, 2020 · 3 comments
Labels
ci enhancement Stalled Team:Automation Label for the Observability productivity team Team:Integrations Label for the Integrations team :Testing

Comments

@jsoriano
Copy link
Member

Describe the enhancement:

mage check runs go 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 because go 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.

@jsoriano jsoriano added enhancement :Testing Team:Integrations Label for the Integrations team ci labels Mar 18, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic
Copy link

botelastic bot commented Feb 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the Stalled label Feb 16, 2021
@jsoriano jsoriano added the Team:Automation Label for the Observability productivity team label Feb 16, 2021
@botelastic botelastic bot removed the Stalled label Feb 16, 2021
@botelastic
Copy link

botelastic bot commented Jan 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the Stalled label Jan 17, 2022
@botelastic botelastic bot closed this as completed Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci enhancement Stalled Team:Automation Label for the Observability productivity team Team:Integrations Label for the Integrations team :Testing
Projects
None yet
Development

No branches or pull requests

2 participants