diff --git a/.golangci-kustomize.yml b/.golangci-kustomize.yml index ae56ad045..c82a87361 100644 --- a/.golangci-kustomize.yml +++ b/.golangci-kustomize.yml @@ -21,7 +21,7 @@ linters: - lll - misspell - nakedret - # - staticcheck (panics) + - staticcheck - structcheck # - stylecheck (panics) # - typecheck (fails in lots of places) diff --git a/api/internal/accumulator/refvartransformer.go b/api/internal/accumulator/refvartransformer.go index 2c712b48d..48f2b7396 100644 --- a/api/internal/accumulator/refvartransformer.go +++ b/api/internal/accumulator/refvartransformer.go @@ -70,6 +70,7 @@ func (rv *refVarTransformer) replaceVars(in interface{}) (interface{}, error) { // This field can potentially contain a $(VAR) since it is // of string type. return expansion2.Expand(s, rv.mappingFunc), nil + //nolint:staticcheck (erroneously claims that `case nil` is unreachable) case nil: return nil, nil default: diff --git a/api/loader/fileloader_test.go b/api/loader/fileloader_test.go index 6109265f2..b77e7b0d6 100644 --- a/api/loader/fileloader_test.go +++ b/api/loader/fileloader_test.go @@ -480,7 +480,7 @@ func TestLoaderDisallowsLocalBaseFromRemoteOverlay(t *testing.T) { t.Fatalf("unexpected root %s", l2.Root()) } // This is not okay. - l3, err = l2.New("../../../highBase") + _, err = l2.New("../../../highBase") if err == nil { t.Fatalf("expected err") }