diff --git a/.golangci.yml b/.golangci.yml index ba878b0..80dd5ab 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,12 +20,12 @@ linters-settings: nestif: # Minimal complexity of if statements to report. # Default: 5 - min-complexity: 12 + min-complexity: 13 cyclop: # The maximal code complexity to report. # Default: 10 - max-complexity: 30 + max-complexity: 45 # The maximal average package complexity. # If it's higher than 0.0 (float) the check is enabled # Default: 0.0 @@ -80,7 +80,7 @@ linters-settings: # Checks the number of statements in a function. # If lower than 0, disable the check. # Default: 40 - statements: 50 + statements: 55 # Ignore comments when counting lines. # Default false ignore-comments: true diff --git a/expression.go b/expression.go index 9bd75d3..5b76e88 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:gocognit // 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") @@ -457,8 +457,6 @@ func (e *Expression) match(secondExpression Expression, ignoreQuery bool) (bool, type DynamicParameterValues map[string]string // InterpolateDynamicParameterValues interpolates dynamic parameter values into the Expression. -// -//nolint:funlen // func implements an alg with well-defined concrete purpose, so high cyclomatic complexity is ok here func (e *Expression) InterpolateDynamicParameterValues(values DynamicParameterValues) (Expression, error) { var cpHead *Node var cpPrevNode *Node diff --git a/parser.go b/parser.go index e050cdc..5d1a454 100644 --- a/parser.go +++ b/parser.go @@ -401,7 +401,7 @@ func (p *Parser) parseVendorOrPackage(s string) (identifier string, tail string, return val, s[i:], nil } -//nolint:funlen,gocyclo // func implements an alg with well-defined concrete purpose, so high cyclomatic complexity is ok here +//nolint:funlen,gocyclo,gocognit // func implements an alg with well-defined concrete purpose, so high cyclomatic complexity is ok here func (p *Parser) parseEntityNameAndVersion(s string) (name EntityName, ver Version, tail string, err error) { if s == "" { return "", Version{}, s, fmt.Errorf(`entity name cannot be empty`)