mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Activate lint staticcheck.
This commit is contained in:
@@ -21,7 +21,7 @@ linters:
|
|||||||
- lll
|
- lll
|
||||||
- misspell
|
- misspell
|
||||||
- nakedret
|
- nakedret
|
||||||
# - staticcheck (panics)
|
- staticcheck
|
||||||
- structcheck
|
- structcheck
|
||||||
# - stylecheck (panics)
|
# - stylecheck (panics)
|
||||||
# - typecheck (fails in lots of places)
|
# - typecheck (fails in lots of places)
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ func (rv *refVarTransformer) replaceVars(in interface{}) (interface{}, error) {
|
|||||||
// This field can potentially contain a $(VAR) since it is
|
// This field can potentially contain a $(VAR) since it is
|
||||||
// of string type.
|
// of string type.
|
||||||
return expansion2.Expand(s, rv.mappingFunc), nil
|
return expansion2.Expand(s, rv.mappingFunc), nil
|
||||||
|
//nolint:staticcheck (erroneously claims that `case nil` is unreachable)
|
||||||
case nil:
|
case nil:
|
||||||
return nil, nil
|
return nil, nil
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ func TestLoaderDisallowsLocalBaseFromRemoteOverlay(t *testing.T) {
|
|||||||
t.Fatalf("unexpected root %s", l2.Root())
|
t.Fatalf("unexpected root %s", l2.Root())
|
||||||
}
|
}
|
||||||
// This is not okay.
|
// This is not okay.
|
||||||
l3, err = l2.New("../../../highBase")
|
_, err = l2.New("../../../highBase")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatalf("expected err")
|
t.Fatalf("expected err")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user