Skip to content

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 12 commits into from
Apr 9, 2025
Merged

ci: improve project linting config #3111

merged 12 commits into from
Apr 9, 2025

Conversation

jharvey10
Copy link
Contributor

@jharvey10 jharvey10 commented Mar 26, 2025

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

  • Remove drone Lint required check
  • Add required checks for the new Test PR / lint / * jobs

Related: #2960

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
@jharvey10 jharvey10 requested a review from dehaansa March 26, 2025 16:12
@jharvey10 jharvey10 requested a review from a team as a code owner March 26, 2025 16:12
- create a single reusable linting workflow that runs all linters in serial.
@jharvey10 jharvey10 changed the title ci: adjust golangci-lint command in makefile ci: adjust project linting config Apr 1, 2025
@jharvey10 jharvey10 changed the title ci: adjust project linting config ci: improve project linting config Apr 1, 2025
@jharvey10 jharvey10 requested a review from ptodev April 1, 2025 23:06
@CLAassistant
Copy link

CLAassistant commented Apr 2, 2025

CLA assistant check
All committers have signed the CLA.

@jharvey10 jharvey10 requested a review from ptodev April 2, 2025 19:54
Copy link
Contributor

@dehaansa dehaansa left a 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.

@dehaansa dehaansa merged commit 5a31174 into main Apr 9, 2025
38 checks passed
@dehaansa dehaansa deleted the ci/make-lint-updates branch April 9, 2025 20:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants