-
Notifications
You must be signed in to change notification settings - Fork 89
Bump and adopt golangci-lint v2 #2404
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
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
text: "ST1003: should not use underscores in Go names;" | ||
path: .*(api|types)\/.*\/.*conversion.*\.go$ | ||
- linters: | ||
- staticcheck |
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.
⚠️ Mergestaticcheck
,stylecheck
,gosimple
into one linter (staticcheck
) (cf. Migration guide)
@@ -495,7 +495,7 @@ docker-build-core-image: ensure-buildx ## Build the multiarch core docker image | |||
|
|||
.PHONY: lint | |||
lint: $(GOLANGCI_LINT) ## Lint codebase | |||
$(GOLANGCI_LINT) run -v --fast=false | |||
$(GOLANGCI_LINT) run -v --fast-only=false |
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.
fast -> fast-only:
https://golangci-lint.run/product/migration-guide/#lintersfast
@@ -214,7 +214,7 @@ type Passwd struct { | |||
|
|||
// PasswdGroup holds the PasswdGroup specific information. | |||
type PasswdGroup struct { | |||
Gid *int `json:"gid,omitempty"` //nolint:stylecheck | |||
Gid *int `json:"gid,omitempty"` //nolint:staticcheck |
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.
stylecheck
is now clubbed under staticcheck
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.
/lgtm
/cc @Amulyam24 |
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.
/lgtm
Thanks @kishen-v !
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Amulyam24, kishen-v, Prajyot-Parab The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This PR adopts the usage of golangci-lint tool(v2) from the existing v1, which is unmaintained. This will allow the latest available features and enhancements to be used associated with the v2 release.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2360
Special notes for your reviewer:
I'd ensured that most of the existing functionalities and checks are in place. Please let me know if additional changes are needed.
/area provider/ibmcloud
/priority important-longterm
/kind cleanup
Release note: