- Two of the linters changed their names
- Updated code and nolint comments to make all linters pass with 1.44.2
- Added a new hack/install-linter.sh script to help developers install
  the expected version of the linter for local development
This commit is contained in:
Ryan Richard
2022-03-08 12:28:09 -08:00
parent 93aaa9e509
commit fffcb7f5b4
24 changed files with 59 additions and 43 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2021 the Pinniped contributors. All Rights Reserved.
// Copyright 2021-2022 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package fakekubeapi contains a *very* simple httptest.Server that can be used to stand in for
@@ -193,7 +193,7 @@ func encodeObj(w http.ResponseWriter, r *http.Request, obj runtime.Object) error
return httperr.Newf(http.StatusInternalServerError, "unable to find serialier with content-type %s", mediaType)
}
data, err := runtime.Encode(serializerInfo.Serializer, obj.(runtime.Object))
data, err := runtime.Encode(serializerInfo.Serializer, obj)
if err != nil {
return httperr.Wrap(http.StatusInternalServerError, "decode obj", err)
}
+2 -1
View File
@@ -1,6 +1,7 @@
// Copyright 2020 the Pinniped contributors. All Rights Reserved.
// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//nolint:goimports // not an import
// +build go1.14
package testutil
+1 -1
View File
@@ -33,7 +33,7 @@ type logger struct {
func (l logger) clone() logger {
out := l
l.values = copySlice(l.values)
l.values = copySlice(l.values) //nolint:staticcheck // ignore ineffective assignment warning
return out
}