-
Notifications
You must be signed in to change notification settings - Fork 4.6k
upgrade: golangci-lint to v2 #22648
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
upgrade: golangci-lint to v2 #22648
Conversation
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.
Pull Request Overview
This PR upgrades golangci-lint from v1.64.8 to v2.4.0 and migrates the configuration to v2 format. The changes include fixing various lint issues that were detected by the newer version of the linter.
- Upgrade golangci-lint to v2.4.0 with updated GitHub Action and module path
- Migrate golangci-lint configuration file to v2 format with restructured settings
- Fix lint issues including simplified returns, unnecessary explicit returns, and unused parameter handling
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.golangci.yml |
Migrated configuration from v1 to v2 format with restructured sections |
Makefile |
Updated golangci-lint version to v2.4.0 |
build-support/scripts/devtools.sh |
Updated module path to include /v2 suffix |
.github/workflows/reusable-lint.yml |
Updated GitHub Action to v8.0.0 for v2 compatibility |
| Multiple Go files | Fixed lint issues including simplified returns and unused parameter naming |
Comments suppressed due to low confidence (1)
agent/structs/acl_ce.go:1
- The function
aclNodeIdentityRulesis being removed entirely. Ensure this function is not referenced elsewhere in the codebase, as removing it could cause compilation errors if it's still being used.
// Copyright (c) HashiCorp, Inc.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* fix: golangci-lint issues * migrate golangci-lint config to v2 * upgrade: golangci-lint to v2.4.0
* fix: golangci-lint staticcheck errors (#22642) * fix: golangci-lint staticcheck errors * fix: missing braces for else in mesh_gateway.go * fix: remove unnecessary type check in otel_sink_test.go * fix: golangci-lint issues (#22644) * upgrade: golangci-lint to v2 (#22648) * fix: golangci-lint issues * migrate golangci-lint config to v2 * upgrade: golangci-lint to v2.4.0 * fix: linter issues in agent/consul (#22651) * Fixing bind addr issue, ipv6 bracket, valid peering token issue m go-discover update (#22584) * Fixing bind addr issue, ipv6 bracket and valid peering token issue * Making addr and port compatible with ipv6 * Updating go-discover to v1.1.0 * Updating testcases * chore:added workflow to delete stale branches (#22658) * upgrade: go to v1.25 (#22652) * update: go version to 1.25 * update: gotestsum version * update: mog, buf and deep-copy * fix: add workaround to install covdata in go toolchain * update: regen proto files * fix: install deep-copy with go 1.23 * add: changelog * update: regen deepcopy files * fix: non-constant format string in formatter * upgrade: mockery and proto-gen, and regen files (#22634) * update: mockery to v3 and generate mocks * update: protoc-gen to v1.5.1 and regen proto go files * fix: use InterfaceName_mock.go for filename in mockery * update: generate mock files with mockery v3 * fix: case in structname in mockery config * update: testcase errMsg in TestPatchStruct * update: increase timeout for context in TestSubscribeBackend_IntegrationWithServer_TLSReload --------- Co-authored-by: Sreeram Narayanan <[email protected]> Co-authored-by: P Ajay Rao <[email protected]> Co-authored-by: Vikramarjuna <[email protected]>
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.18,1.19,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.18,1.19,1.21] please perform the backport manually and add the following snippet to your backport PR description: |
1 similar comment
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.18,1.19,1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
29 similar comments
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @sreeram77! a backport is missing for this PR [22648] for versions [1.21] please perform the backport manually and add the following snippet to your backport PR description: |
Description
Testing & Reproduction steps
Links
PR Checklist
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've documented the impact of any changes to security controls.
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.