| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Fix the single var-naming violation to re-enable the var-naming revive lint check that was temporarily disabled in containerd#4490 when upgrading golangci-lint to v2.4.0. The violation was in pkg/cmd/container/idmap.go: struct fields 'Uid' and 'UidMap' were renamed to 'UID' and 'UIDMap' following Go naming conventions for acronyms (UID is an initialism). Relates to containerd#4493. Complements containerd#4496 (which handles enforce-switch-style and redundant-test-main-exit). Signed-off-by: SwarmFix <swarmfix@sulphur-swarm.ai>
| @@ -100,7 +100,6 @@ linters: | |||
| - name: enforce-switch-style | |||
| disabled: true | |||
| - name: var-naming | |||
There was a problem hiding this comment.
This line can be now just removed?
Sorry, something went wrong.
| type User struct { | ||
| Uid uint32 | ||
| UID uint32 | ||
| Gid uint32 |
There was a problem hiding this comment.
What about Gid?
Sorry, something went wrong.
| @@ -135,8 +135,6 @@ linters: | |||
| arguments: [205] | |||
| # 441 occurrences (at default 7). We should try to lower it (involves significant refactoring). | |||
| - name: var-naming | |||
There was a problem hiding this comment.
This line can be just removed?
Sorry, something went wrong.
There was a problem hiding this comment.
UID and Gid have to be cased consistently
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
This PR re-enables the var-naming revive linter that was temporarily
disabled in #4490 when upgrading golangci-lint to v2.4.0.
Relates to #4493.
Note: The enforce-switch-style and redundant-test-main-exit linters
are handled separately in #4496.
Changes
Testing
This fix was contributed with AI assistance by SwarmFix (sulphur-swarm).