diff --git a/.github/.golangci.yml b/.github/.golangci.yml index eedaaabc..49d3b001 100644 --- a/.github/.golangci.yml +++ b/.github/.golangci.yml @@ -2,36 +2,24 @@ run: timeout: 5m linters-settings: - dupl: - threshold: 100 - goimports: - local-prefixes: github.com/newrelic/nri-kube-events gocyclo: min-complexity: 20 - golint: - min-confidence: 0.8 govet: - shadow: true - maligned: - suggest-new: true + enable: + - shadow +# - fieldalignment misspell: locale: US - nolintlint: - allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) - allow-unused: false # report any unused nolint directives - require-explanation: false # don't require an explanation for nolint directives - require-specific: false # don't require nolint directives to be specific about which linter is being skipped linters: disable-all: true enable: - bodyclose + - copyloopvar - dogsled - errcheck - errorlint - exhaustive - #- exportloopref Since Go1.22 (loopvar) this linter is no longer relevant. - - copyloopvar - gocyclo - goprintffuncname - gosimple diff --git a/cmd/main.go b/cmd/main.go index e2c20b87..6f8dffe0 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -238,7 +238,7 @@ func main() { logger.Info("Shutting down health checker") stopCtx, stopCtxCancel := context.WithTimeout(context.Background(), 25*time.Second) defer stopCtxCancel() - if err := healthMonitor.Shutdown(stopCtx); err != nil { + if err = healthMonitor.Shutdown(stopCtx); err != nil { setupLog.Error(err, "failed to shutdown health checker") } else { logger.Info("Shut down health checker")