build(deps): bump https://github.com/golangci/golangci-lint from v2.11.4 to 2.12.1 in the pre-commit group#462
Conversation
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>
|
@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>
Fixed all 50 new |
|
@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>
Good catch. Extended the consts to nearby siblings in the same maps/structs/test series:
Lint is still clean and tests pass. See d7138f9. |
|
@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 |
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>
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):
To make this work I converted Lint still 0 issues, affected unit tests pass. See f8cf9df. |
Bumps the pre-commit group with 1 update: https://github.com/golangci/golangci-lint.
Updates
https://github.com/golangci/golangci-lintfrom v2.11.4 to 2.12.1Release notes
Sourced from https://github.com/golangci/golangci-lint's releases.
Changelog
Sourced from https://github.com/golangci/golangci-lint's changelog.
... (truncated)
Commits
9aa24e9chore: prepare release3a006abgomodguard: fix panic with migration suggestion (#6542)35b2189fix: install.sh script (#6539)6349bbcdocs: update GitHub Action assets (#6538)7761527chore: prepare release8116fb5build(deps): bump github.com/bombsimon/wsl/v5 from 5.6.0 to 5.8.0 (#6536)eec5c47build(deps): bump github.com/Masterminds/semver/v3 from 3.4.0 to 3.5.0 (#6535)c670072build(deps): bump github.com/alecthomas/chroma/v2 from 2.23.1 to 2.24.1 (#6534)80ad1dcfeat: embed the JSON schema in the binary (#6533)8589d80build(deps): bump github.com/securego/gosec/v2 from 2.25.0 to 2.26.1 (#6532)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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major versionwill 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 versionwill 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