-
Notifications
You must be signed in to change notification settings - Fork 374
ci: improve project linting config #3111
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The existing command was ignoring non-zero exit codes from the linter and required the golangci-lint command to be on the path. This commit adjusts it to be in the bin dir inside of the GOPATH. A better approach (if needed) might be to check first for a GOBIN and use that, and if empty, fall back to GOPATH + /bin/golangci-lint
ptodev
approved these changes
Apr 1, 2025
- create a single reusable linting workflow that runs all linters in serial.
dehaansa
reviewed
Apr 1, 2025
ptodev
reviewed
Apr 2, 2025
dehaansa
approved these changes
Apr 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I think we merge this, renovate, and my linter action update PR (#3141) after the release candidate is cut.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The existing golangci-lint command in the Makefile was ignoring non-zero exit codes from the linter and required the golangci-lint command to be on the PATH. This PR adjusts that logic to search the GOBIN dir, the GOPATH/bin dir, the PATH, and a fallback value to make the logic more portable.
Consolidates linting workflows and causes them to run against main branch builds in addition to PRs.
Includes UI linting as part of CI workflows (main and PRs)
Notes to the Reviewer
Ensure that this change doesn't break your local development environment!
It's hard for me to know where the various installations of golangci-lint might be, and I'm happy to make adjustments to accommodate.
TODO
Related: #2960