Skip to content

Commit 4d0fa65

Browse files
authored
build: Temporary lint config fix until next golangci-lint release (#629)
See golangci/golangci-lint#4697 for details and waiting on golangci/golangci-lint#4698 to be released before we can revert this fix.
1 parent 184abec commit 4d0fa65

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.golangci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,10 @@ issues:
101101
- source: "// \\+kubebuilder:"
102102
linters:
103103
- lll
104-
# Idiomatic to use init functions to register APIs with scheme
105-
# Path is relative to api module root.
106-
- path: "v1alpha1"
107-
linters:
108-
- gochecknoinits
104+
# Temporary workaround until https://github.com/golangci/golangci-lint/pull/4698 is
105+
# available in released version of golangci-lint
106+
- path: "(test/e2e/e2e_suite_test.go|v1alpha1)"
107+
text: "don't use `init` function"
109108
# Idiomatic to use pass holderRef by value
110109
- text: "hugeParam: holderRef is heavy"
111110
linters:

test/e2e/e2e_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
clusterctltemp "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/test/framework/clusterctl"
3333
)
3434

35-
func init() { //nolint:gochecknoinits // Idiomatically used to set up flags.
35+
func init() {
3636
flag.StringVar(&configPath, "e2e.config", "", "path to the e2e config file")
3737
flag.StringVar(
3838
&artifactFolder,

0 commit comments

Comments
 (0)