Skip to content

Commit

Permalink
golangci-lint: remove gocognit and gocyclo
Browse files Browse the repository at this point in the history
Some complexities can't be avoided ;)
  • Loading branch information
talal committed Aug 12, 2020
1 parent e7af369 commit ca27f3c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
8 changes: 0 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ linters-settings:
# See https://github.com/kisielk/errcheck#excluding-functions for details.
exclude: ./.errcheck-excludes

gocognit:
# Minimal code complexity to report, 30 by default.
min-complexity: 20

gocyclo:
# Minimal code complexity to report, 30 by default.
min-complexity: 20

goimports:
# Put imports beginning with prefix after 3rd-party packages. It's a
# comma-separated list of prefixes.
Expand Down
1 change: 0 additions & 1 deletion internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ func (c *Controller) processNextWorkItem() bool {

// syncHandler gets a PrometheusRule from the queue and updates the
// corresponding absent metric alert PrometheusRule for it.
//nolint:gocyclo,gocognit
func (c *Controller) syncHandler(key string) error {
// Convert the namespace/name string into a distinct namespace and name.
namespace, name, err := cache.SplitMetaNamespaceKey(key)
Expand Down

0 comments on commit ca27f3c

Please sign in to comment.