Skip to content

build(deps): bump https://github.com/golangci/golangci-lint from v2.11.4 to 2.12.1 in the pre-commit group#462

Open
dependabot[bot] wants to merge 4 commits into
mainfrom
dependabot/pre_commit/pre-commit-ff8a2fe423
Open

build(deps): bump https://github.com/golangci/golangci-lint from v2.11.4 to 2.12.1 in the pre-commit group#462
dependabot[bot] wants to merge 4 commits into
mainfrom
dependabot/pre_commit/pre-commit-ff8a2fe423

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 4, 2026

Bumps the pre-commit group with 1 update: https://github.com/golangci/golangci-lint.

Updates https://github.com/golangci/golangci-lint from v2.11.4 to 2.12.1

Release notes

Sourced from https://github.com/golangci/golangci-lint's releases.

v2.12.1

golangci-lint is a free and open-source project built by volunteers.

If you value it, consider supporting us, the maintainers and linter authors.

We appreciate it! ❤️

For key updates, see the changelog.

Changelog

[!IMPORTANT] If you are using the install script from the master branch: https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh This branch is not used anymore, we are using main.

We recommend using https://golangci-lint.run/install.sh as URL to install golangci-lint.

https://golangci-lint.run/docs/welcome/install/local/#binaries

  • 35b2189782a6a059489289257e6523550167cb64 fix: install.sh script (#6539)
  • 3a006ab284f52a5aac0a7daa77ae683e43fb7b69 gomodguard: fix panic with migration suggestion (#6542)
Changelog

Sourced from https://github.com/golangci/golangci-lint's changelog.

Follow the news and releases on Mastodon and on Bluesky.

golangci-lint is a free and open-source project built by volunteers.

If you value it, consider supporting us, we appreciate it!

Donate

v1.64.8

Released on 2025-03-17

  • Detects use of configuration files from golangci-lint v2

v1.64.7

Released on 2025-03-11

  1. Linters bug fixes
    • depguard: from 2.2.0 to 2.2.1
    • dupl: from 3e9179ac440a to f665c8d69b32
    • gosec: from 2.22.1 to 2.22.2
    • staticcheck: from 0.6.0 to 0.6.1
  2. Documentation
    • Add GitLab documentation

v1.64.6

Released on 2025-03-02

  1. Linters bug fixes
    • asciicheck: from 0.4.0 to 0.4.1
    • contextcheck: from 1.1.5 to 1.1.6
    • errcheck: from 1.8.0 to 1.9.0
    • exptostd: from 0.4.1 to 0.4.2
    • ginkgolinter: from 0.19.0 to 0.19.1
    • go-exhaustruct: from 3.3.0 to 3.3.1
    • gocheckcompilerdirectives: from 1.2.1 to 1.3.0
    • godot: from 1.4.20 to 1.5.0
    • perfsprint: from 0.8.1 to 0.8.2
    • revive: from 1.6.1 to 1.7.0
    • tagalign: from 1.4.1 to 1.4.2

v1.64.5

Released on 2025-02-13

  1. Bug fixes

... (truncated)

Commits
  • 9aa24e9 chore: prepare release
  • 3a006ab gomodguard: fix panic with migration suggestion (#6542)
  • 35b2189 fix: install.sh script (#6539)
  • 6349bbc docs: update GitHub Action assets (#6538)
  • 7761527 chore: prepare release
  • 8116fb5 build(deps): bump github.com/bombsimon/wsl/v5 from 5.6.0 to 5.8.0 (#6536)
  • eec5c47 build(deps): bump github.com/Masterminds/semver/v3 from 3.4.0 to 3.5.0 (#6535)
  • c670072 build(deps): bump github.com/alecthomas/chroma/v2 from 2.23.1 to 2.24.1 (#6534)
  • 80ad1dc feat: embed the JSON schema in the binary (#6533)
  • 8589d80 build(deps): bump github.com/securego/gosec/v2 from 2.25.0 to 2.26.1 (#6532)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Bumps the pre-commit group with 1 update: [https://github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint).


Updates `https://github.com/golangci/golangci-lint` from v2.11.4 to 2.12.1
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/main/CHANGELOG-v1.md)
- [Commits](golangci/golangci-lint@8f3b0c7...9aa24e9)

---
updated-dependencies:
- dependency-name: https://github.com/golangci/golangci-lint
  dependency-version: 2.12.1
  dependency-type: direct:production
  dependency-group: pre-commit
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file safe to test labels May 4, 2026
@dependabot dependabot Bot requested review from a team, croomes, jmclong and landreasyan as code owners May 4, 2026 12:21
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file safe to test labels May 4, 2026
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:21 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:21 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:21 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:21 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:21 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@dependabot dependabot Bot temporarily deployed to pull-request May 4, 2026 12:26 Inactive
@jmclong
Copy link
Copy Markdown
Contributor

jmclong commented May 4, 2026

@copilot can you update the pr to fix all of the new linter issues. Actually fix this issue (dont suppress)

Address `goconst` findings introduced by golangci-lint v2.12.1 by
introducing named constants instead of suppressing the warnings.

Agent-Logs-Url: https://github.com/Azure/local-csi-driver/sessions/51d2f746-5d16-4bd1-ae3b-1714f04b38bd

Co-authored-by: jmclong <44989821+jmclong@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

@copilot can you update the pr to fix all of the new linter issues. Actually fix this issue (dont suppress)

Fixed all 50 new goconst findings (plus a few more that surfaced as duplicates were consolidated) by extracting the duplicated string literals into named constants — no nolint suppressions. golangci-lint run now reports 0 issues. See b86fb17.

Copilot finished work on behalf of jmclong May 4, 2026 17:05
@jmclong
Copy link
Copy Markdown
Contributor

jmclong commented May 5, 2026

@copilot if we made some change in some series of key - values pairs or in a structure to add a const but didn't add consts for other parts of that object, can we add those also as consts

Where a struct/map had some keys or values converted to constants but
nearby siblings were left as string literals, extract those siblings
too so the related group is uniformly named.

Agent-Logs-Url: https://github.com/Azure/local-csi-driver/sessions/b413fc1e-5b97-49fa-90cd-2c0c17f46fea

Co-authored-by: jmclong <44989821+jmclong@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

@copilot if we made some change in some series of key - values pairs or in a structure to add a const but didn't add consts for other parts of that object, can we add those also as con...

Good catch. Extended the consts to nearby siblings in the same maps/structs/test series:

  • internal/csi/core/lvm/: added testFailoverModeKey / testFailoverAvail (siblings of testCapacityKey/testLimitKey in the same Parameters/VolumeContext maps).
  • internal/manager/pvcleanup/: added pvcTestNode4 / pvcTestNode5 (siblings of pvcTestNode1..3 in the same Node.Name test series).
  • internal/gc/: added gcTestNode3 (sibling of gcTestNode1/gcTestNode2).
  • internal/pkg/probe/: added modelSamsungV2 / modelIntel (siblings of modelSamsung in the same model-list literals).

Lint is still clean and tests pass. See d7138f9.

@jmclong
Copy link
Copy Markdown
Contributor

jmclong commented May 8, 2026

@copilot if there are consts like these that are present in the source, can you make them accessible by the test and use the const from teh source? Do a thorough scan

				"localdisk.csi.acstor.io/capacity":      "1073741824",
				"localdisk.csi.acstor.io/limit":         "0",
				"localdisk.csi.acstor.io/failover-mode": "availability",

Where a test constant mirrored a value defined in production source,
reference the source constant directly so the two cannot drift.

- internal/csi/core/lvm: convert CapacityParam/LimitParam from var to
  const so they can appear in test const blocks.
- internal/csi/core/lvm test consts: testCapacityKey, testLimitKey,
  testFailoverModeKey, testFailoverAvail, testTopologyNodeKey,
  testDeviceTypeDisk, testVolumeFullID, testVgTagsLocalCsi.
- internal/gc test consts: gcTestSelectedInitialNode, gcTestSelectedNode,
  gcTestVolumeGroup, gcTestVolumeFullID.
- internal/csi/node tests: lvm.CapacityParam in pv attributes and
  recovery error message.

Agent-Logs-Url: https://github.com/Azure/local-csi-driver/sessions/3498b723-9438-4e16-95db-4d2a0fe2849d

Co-authored-by: jmclong <44989821+jmclong@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

@copilot if there are consts like these that are present in the source, can you make them accessible by the test and use the const from teh source? Do a thorough scan

  			"localdisk.csi.acstor.io/...

Done. Scanned the test consts I added and replaced any that mirrored a production source const with a direct reference (so they can't drift):

  • internal/csi/core/lvm/testconst_test.go: testCapacityKeylvm.CapacityParam, testLimitKeylvm.LimitParam, testFailoverModeKeyhyperconverged.FailoverModeParam, testFailoverAvailhyperconverged.FailoverModeAvailability, testTopologyNodeKeylvm.TopologyKey, testDeviceTypeDiskprobe.DeviceTypeDisk, testVolumeFullIDlvm.DefaultVolumeGroup + "#" + testVolume, testVgTagsLocalCsi"vg_tags=" + lvm.DefaultVolumeGroupTag.
  • internal/gc/testconst_test.go: gcTestSelectedInitialNodecsi.SelectedInitialNodeParam, gcTestSelectedNodecsi.SelectedNodeAnnotation, gcTestVolumeGrouplvm.DefaultVolumeGroup, gcTestVolumeFullID derived from gcTestVolumeGroup.
  • internal/csi/node/node_test.go: bare "localdisk.csi.acstor.io/capacity" literals (in PV attributes and recovery error message) → lvm.CapacityParam.

To make this work I converted lvm.CapacityParam and lvm.LimitParam from varconst (they were already initialized from a const expression DriverName + "/...", so the change is mechanical and they're now usable in const blocks).

Lint still 0 issues, affected unit tests pass. See f8cf9df.

Copilot finished work on behalf of jmclong May 8, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file safe to test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants