-
Notifications
You must be signed in to change notification settings - Fork 36
ci: migrate golangci to v2 schema and correct issues #259
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebrandon1 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @sebrandon1. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
It seems like Actions aren't enabled on this repository. Is that something that can be enabled by an admin? |
/ok-to-test |
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.
Like the idea of linting our codebase,
but we cannot use GitHub actions immediately.
@@ -0,0 +1,27 @@ | |||
name: Test Incoming Changes |
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.
We could add a make
target in this repository that runs the linter with the proposed .golangci.yaml
config.
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.
And, add a new linter test onto our CI configs, feel free to raise PRs on o/release for this.
That way we do not need to introduce extraneous GitHub Actions (and end up paying for runners).
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.
This PR uses ubuntu-latest
runners which are the free tier, no billing plan required.
As for the make target, I agree we could also add that. The action golangci/golangci-lint-action@v7
automatically detects the .golangci.yml and uses those settings and manages the installation and running of the linter for us.
@sebrandon1: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Similar to other
v2
migrations:There were a number of things that the latest version of golangci-lint flagged for fixing.
Also, I added a
.github/workflows/pre-main.yaml
that contains a job to run the linter prior to merging PRs.