Skip to content

Commit

Permalink
build: Temporary lint config fix until next golangci-lint release (#629)
Browse files Browse the repository at this point in the history
See golangci/golangci-lint#4697 for details
and waiting on golangci/golangci-lint#4698 to be
released before we can revert this fix.
  • Loading branch information
jimmidyson authored May 8, 2024
1 parent 184abec commit 4d0fa65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,10 @@ issues:
- source: "// \\+kubebuilder:"
linters:
- lll
# Idiomatic to use init functions to register APIs with scheme
# Path is relative to api module root.
- path: "v1alpha1"
linters:
- gochecknoinits
# Temporary workaround until https://github.com/golangci/golangci-lint/pull/4698 is
# available in released version of golangci-lint
- path: "(test/e2e/e2e_suite_test.go|v1alpha1)"
text: "don't use `init` function"
# Idiomatic to use pass holderRef by value
- text: "hugeParam: holderRef is heavy"
linters:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
clusterctltemp "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/test/framework/clusterctl"
)

func init() { //nolint:gochecknoinits // Idiomatically used to set up flags.
func init() {
flag.StringVar(&configPath, "e2e.config", "", "path to the e2e config file")
flag.StringVar(
&artifactFolder,
Expand Down

0 comments on commit 4d0fa65

Please sign in to comment.