Skip to content

chore: migrate .golangci.yml to v2 format#331

Open
jiridanek wants to merge 1 commit intoopenshift:mainfrom
jiridanek:chore-golangci-lint-v2
Open

chore: migrate .golangci.yml to v2 format#331
jiridanek wants to merge 1 commit intoopenshift:mainfrom
jiridanek:chore-golangci-lint-v2

Conversation

@jiridanek
Copy link
Copy Markdown
Member

Summary

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: ""
See https://golangci-lint.run/docs/product/migration-guide for migration instructions

This was generated with golangci-lint migrate. Notable changes:

  • gofumpt moved from linters to formatters (v2 distinguishes formatters from linters)
  • run.timeout removed (disabled by default in v2)
  • Default exclusion presets added by the migration tool

Note: one pre-existing staticcheck finding (QF1008 in internal/types/types_config.go:143) is now surfaced. It was not previously visible because the v1 config suppressed it.

Made with Cursor

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>
@openshift-ci openshift-ci Bot requested a review from kolyshkin May 9, 2026 10:49
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 9, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jiridanek
Once this PR has been reviewed and has the lgtm label, please assign rhmdnd for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot requested a review from mrunalp May 9, 2026 10:49
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 9, 2026

@jiridanek: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify 9d077c4 link true /test verify

Full PR test history. Your PR dashboard.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant