summaryrefslogtreecommitdiff
path: root/pkg/k8s.io
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-06-13 16:08:46 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-06-14 16:29:42 +0200
commit41528739cef3d2b61e9b7437f6c557e60dbb79c0 (patch)
tree6fec977dbeb99f71e439d79333ea74114881e31f /pkg/k8s.io
parent78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc (diff)
downloadpodman-41528739cef3d2b61e9b7437f6c557e60dbb79c0.tar.gz
podman-41528739cef3d2b61e9b7437f6c557e60dbb79c0.tar.bz2
podman-41528739cef3d2b61e9b7437f6c557e60dbb79c0.zip
golangci-lint: enable nolintlint
The nolintlint linter does not deny the use of `//nolint` Instead it allows us to enforce a common nolint style: - force that a linter name must be specified - do not add a space between `//` and `nolint` - make sure nolint is only used when there is actually a problem Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/k8s.io')
-rw-r--r--pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go b/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go
index dcc5df219..588a189bf 100644
--- a/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go
+++ b/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go
@@ -138,7 +138,6 @@ const (
var (
// Errors that could happen while parsing a string.
- //nolint:revive
ErrFormatWrong = errors.New("quantities must match the regular expression '" + splitREString + "'")
ErrNumeric = errors.New("unable to parse numeric part of quantity")
ErrSuffix = errors.New("unable to parse quantity's suffix")
@@ -258,7 +257,7 @@ Suffix:
// we encountered a non decimal in the Suffix loop, but the last character
// was not a valid exponent
err = ErrFormatWrong
- // nolint:nakedret
+ //nolint:nakedret
return
}
@@ -579,9 +578,9 @@ func (q Quantity) MarshalJSON() ([]byte, error) {
// if CanonicalizeBytes needed more space than our slice provided, we may need to allocate again so use
// append
result = result[:1]
- result = append(result, number...) // nolint: makezero
- result = append(result, suffix...) // nolint: makezero
- result = append(result, '"') // nolint: makezero
+ result = append(result, number...) //nolint: makezero
+ result = append(result, suffix...) //nolint: makezero
+ result = append(result, '"') //nolint: makezero
return result, nil
}