From 9e945d7547db645bde49fc0acf288dd728b7b5cb Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Mon, 7 Dec 2020 15:51:41 -0600 Subject: [PATCH] Disable the goerr113 linter. This linter is nice in principle, but I've found it more annoying than helpful in practice. Signed-off-by: Matt Moyer --- .golangci.yaml | 2 -- internal/controllerlib/option.go | 2 -- .../test/integration/examplecontroller/controller/creating.go | 1 - .../test/integration/examplecontroller/controller/updating.go | 1 - 4 files changed, 6 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 9578fd7e..a4190d1b 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -30,7 +30,6 @@ linters: - gocritic - gocyclo - godot - - goerr113 - goheader - goimports - golint @@ -56,7 +55,6 @@ issues: linters: - funlen - gochecknoglobals - - goerr113 linters-settings: funlen: diff --git a/internal/controllerlib/option.go b/internal/controllerlib/option.go index a3c2f1b0..38e89f58 100644 --- a/internal/controllerlib/option.go +++ b/internal/controllerlib/option.go @@ -91,13 +91,11 @@ func WithInformer(getter InformerGetter, filter Filter, opt InformerOption) Opti if err != nil { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { - //nolint: goerr113 utilruntime.HandleError(fmt.Errorf("%s: could not get object from tombstone: %+v", c.Name(), obj)) return } accessor, err = meta.Accessor(tombstone.Obj) if err != nil { - //nolint: goerr113 utilruntime.HandleError(fmt.Errorf("%s: tombstone contained object that is not an accessor: %+v", c.Name(), obj)) return } diff --git a/internal/controllerlib/test/integration/examplecontroller/controller/creating.go b/internal/controllerlib/test/integration/examplecontroller/controller/creating.go index 418d0d4f..17fd15e2 100644 --- a/internal/controllerlib/test/integration/examplecontroller/controller/creating.go +++ b/internal/controllerlib/test/integration/examplecontroller/controller/creating.go @@ -93,7 +93,6 @@ func NewExampleCreatingController( } if actualSecret.Annotations[api.ServiceUIDAnnotation] != string(service.UID) { - //nolint: goerr113 utilruntime.HandleError(fmt.Errorf("secret %s/%s does not have corresponding service UID %v", actualSecret.Namespace, actualSecret.Name, service.UID)) return nil // drop from queue because we cannot safely update this secret } diff --git a/internal/controllerlib/test/integration/examplecontroller/controller/updating.go b/internal/controllerlib/test/integration/examplecontroller/controller/updating.go index 3bafdf88..867d660e 100644 --- a/internal/controllerlib/test/integration/examplecontroller/controller/updating.go +++ b/internal/controllerlib/test/integration/examplecontroller/controller/updating.go @@ -105,7 +105,6 @@ func NewExampleUpdatingController( } if !isSecretValidForService(service, secret) { - //nolint: goerr113 utilruntime.HandleError(fmt.Errorf("secret %s/%s does not have corresponding service UID %v", secret.Namespace, secret.Name, service.UID)) return nil }