Skip to content

Commit 09f588d

Browse files
committed
Exclude revive's new stdlib-shadowing var-naming check
The golangci-lint v2.9.0 upgrade (previous commit) brought in a newer revive with an additional var-naming sub-check that flags package names shadowing Go stdlib package names. It flags three long-standing, intentional package names in this codebase that predate this PR and are unrelated to the x/net/Go-version bump: `fs` (internal/third_party/dep/fs), `driver` (pkg/storage/driver), and `version` (internal/version). Excluding by the same pattern already used for revive's redefines-builtin-id exclusions above, rather than renaming stable, widely-referenced packages to satisfy a newly-enabled check. Ref: HELM-821
1 parent 130ab94 commit 09f588d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ linters:
4444
- linters:
4545
- revive
4646
text: 'redefines-builtin-id: redefinition of the built-in function new'
47+
# New in the golangci-lint v2.9.0 upgrade (needed for Go 1.26 support, see HELM-821):
48+
# revive's var-naming check now also flags package names that shadow stdlib package
49+
# names (e.g. `fs`, `driver`, `version`). These are long-standing, intentional names
50+
# in this codebase (internal/third_party/dep/fs, pkg/storage/driver, internal/version)
51+
# unrelated to this change; not worth renaming packages just to satisfy a new check.
52+
- linters:
53+
- revive
54+
text: 'var-naming: avoid package names that conflict with Go standard library package names'
4755
paths:
4856
- third_party$
4957
- builtin$

0 commit comments

Comments
 (0)