diff --git a/.golangci.yml b/.golangci.yml index 5261fa9..ba878b0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,6 +17,11 @@ run: # This file contains only configs which differ from defaults. # All possible options can be found here https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml linters-settings: + nestif: + # Minimal complexity of if statements to report. + # Default: 5 + min-complexity: 12 + cyclop: # The maximal code complexity to report. # Default: 10 @@ -232,7 +237,7 @@ linters: - nilnil # checks that there is no simultaneous return of nil error and an invalid value - noctx # finds sending http request without context.Context - nolintlint # reports ill-formed or insufficient nolint directives - - nonamedreturns # reports all named returns + # - nonamedreturns # reports all named returns - nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL - perfsprint # checks that fmt.Sprintf can be replaced with a faster alternative - predeclared # finds code that shadows one of Go's predeclared identifiers diff --git a/expression.go b/expression.go index 95672dd..9bd75d3 100644 --- a/expression.go +++ b/expression.go @@ -362,7 +362,7 @@ func (e *Expression) MatchIgnoreQuery(secondExpression Expression) (bool, error) return e.match(secondExpression, true) } -// nolint:gocyclo // func implements an alg with well-defined concrete purpose, so high cyclomatic complexity is ok here +//nolint:gocyclo // func implements an alg with well-defined concrete purpose, so high cyclomatic complexity is ok here func (e *Expression) match(secondExpression Expression, ignoreQuery bool) (bool, error) { if e.AttributeSelector != "" { return false, fmt.Errorf("matching of CTI with attribute selector is not supported")