Skip to content

update golangci-lint to v2 #3391

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cnvergence
Copy link
Member

@cnvergence cnvergence commented Apr 30, 2025

Summary

Update golangci-lint to v2, migrate the old configuration and fix all the lint issues.

What Type of PR Is This?

/kind chore

Related Issue(s)

Fixes #3378

Release Notes

NONE

@kcp-ci-bot kcp-ci-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Apr 30, 2025
@kcp-ci-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kcp-ci-bot kcp-ci-bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Apr 30, 2025
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cnvergence cnvergence marked this pull request as ready for review May 2, 2025 14:12
@kcp-ci-bot kcp-ci-bot removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels May 2, 2025
@cnvergence cnvergence force-pushed the update-golangci-lint branch from 9dd832c to 70123cc Compare May 2, 2025 15:40
@kcp-ci-bot kcp-ci-bot added area/cli Issues or PRs related to CLI changes size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 2, 2025
@cnvergence cnvergence force-pushed the update-golangci-lint branch from 70123cc to b839021 Compare May 2, 2025 16:15
@MikeSpreitzer
Copy link
Contributor

/honk

cnvergence added 2 commits May 2, 2025 18:26
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>

On-behalf-of: @SAP [email protected]
@cnvergence
Copy link
Member Author

/hold

@kcp-ci-bot kcp-ci-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 2, 2025
@cnvergence
Copy link
Member Author

Putting it on hold, disabled gci formatter as it throws error

WARN [runner] Can't run linter goanalysis_metalinter: gci: error while running gci: 27:59: expected ';', found "github.com/kcp-dev/logicalcluster/v3" (and 2 more errors) 
ERRO Running error: can't run linter goanalysis_metalinter
gci: error while running gci: 27:59: expected ';', found "github.com/kcp-dev/logicalcluster/v3" (and 2 more errors) 
make: *** [imports] Error 3

Signed-off-by: Karol Szwaj <[email protected]>

On-behalf-of: @SAP [email protected]
@cnvergence cnvergence force-pushed the update-golangci-lint branch from b839021 to 98ae1aa Compare May 2, 2025 16:30
Signed-off-by: Karol Szwaj <[email protected]>

On-behalf-of: @SAP [email protected]
@cnvergence cnvergence force-pushed the update-golangci-lint branch from 9e11f96 to b97046f Compare May 5, 2025 07:42
@cnvergence
Copy link
Member Author

cc @xrstf

@MikeSpreitzer
Copy link
Contributor

/honk

@cnvergence
Copy link
Member Author

xref daixiang0/gci#232
we will wait with this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Issues or PRs related to CLI changes dco-signoff: yes Indicates the PR's author has signed the DCO. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: update golangci-lint to v2
3 participants