chore: migrate .golangci.yml to v2 format#331
Conversation
golangci-lint v2 requires a `version: "2"` field in the config file. Without it, the linter refuses to run: Error: can't load config: unsupported version of the configuration Generated with `golangci-lint migrate`. Notable changes: - `gofumpt` moved from linters to formatters (v2 distinction) - `run.timeout` removed (disabled by default in v2) - default exclusion presets added Co-authored-by: Cursor <cursoragent@cursor.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jiridanek The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@jiridanek: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
smith-xyz
left a comment
There was a problem hiding this comment.
Is golangci-lint v2 actually available in CI? If not, this PR needs a paired change to the CI image/Makefile first.
As far as I can see its using v1.64.8
|
I've been overly eager here, I think. I had v2 on my machine and I sort of went from there. |
Summary
golangci-lint v2 requires a
version: "2"field in the config file. Without it, the linter refuses to run:This was generated with
golangci-lint migrate. Notable changes:gofumptmoved fromlinterstoformatters(v2 distinguishes formatters from linters)run.timeoutremoved (disabled by default in v2)Note: one pre-existing
staticcheckfinding (QF1008ininternal/types/types_config.go:143) is now surfaced. It was not previously visible because the v1 config suppressed it.Made with Cursor