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

chore: support windows and mac for Go linter #10782

Closed
wants to merge 3 commits into from
Closed

Conversation

sspaink
Copy link
Contributor

@sspaink sspaink commented Mar 4, 2022

Taken from the golangci-lint github action documentation: https://github.com/golangci/golangci-lint-action#multiple-os-support

@telegraf-tiger telegraf-tiger bot added the chore label Mar 4, 2022
@powersj
Copy link
Contributor

powersj commented Mar 4, 2022

Do [need|want] to run it on all three OSes? I would have thought linting should be OS-independent?

@sspaink
Copy link
Contributor Author

sspaink commented Mar 4, 2022

I thought it would be as well, but I noticed in this PR: #6590 that the linter didn't catch issues because the files changed are only building for windows but I can see the linter issues when I am on a windows OS.

@sspaink
Copy link
Contributor Author

sspaink commented Mar 4, 2022

I think I am on the wrong path here, looks like there is a build-tags configuration that you need to set to check files with build tags. Documentation is light all I could find was this: https://golangci-lint.run/usage/configuration/#run-configuration and these relevant issues: golangci/golangci-lint#1646, golangci/golangci-lint#517

golangci-lint does run multiple linters, we won't need to run it on the specific OS if they are all statically checking the files so we will need to play around with this.

@sspaink sspaink marked this pull request as draft March 4, 2022 23:25
@sspaink
Copy link
Contributor Author

sspaink commented Jul 5, 2022

Closing for now as there doesn't seem to be a good solution for this and it isn't high priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants