diff --git a/.golangci.yml b/.golangci.yml index 5197d381..c43cf215 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,13 +6,13 @@ linters: - bodyclose - containedctx - contextcheck - - cyclop - copyloopvar + - cyclop - decorder - dogsled - dupl - - durationcheck - dupword + - durationcheck - err113 - errcheck - errchkjson @@ -20,6 +20,7 @@ linters: - errorlint - exhaustive - exptostd + - fatcontext - forbidigo - forcetypeassert - funlen @@ -46,11 +47,13 @@ linters: - iface - importas - inamedparam - - interfacebloat - ineffassign + - interfacebloat + - intrange - lll - loggercheck - maintidx + - makezero - mirror - misspell - mnd @@ -79,7 +82,6 @@ linters: - stylecheck - tagalign - tagliatelle - - tenv - testifylint - testpackage - thelper @@ -88,8 +90,8 @@ linters: - unconvert - unparam - unused - - usetesting - usestdlibvars + - usetesting - wastedassign - whitespace - wrapcheck @@ -152,8 +154,6 @@ linters-settings: block-size: 5 goimports: local-prefixes: github.com/vladopajic/go-test-coverage/v2 - tenv: - all: true wsl: force-err-cuddling: true diff --git a/pkg/testcoverage/coverage/profile.go b/pkg/testcoverage/coverage/profile.go index 5cc44d14..1cb4c859 100644 --- a/pkg/testcoverage/coverage/profile.go +++ b/pkg/testcoverage/coverage/profile.go @@ -67,7 +67,7 @@ func mergeSameFileProfile(ap, bp *cover.Profile) (*cover.Profile, error) { return nil, fmt.Errorf("inconsistent profiles length [%q, %q]", ap.FileName, bp.FileName) } - for i := 0; i < len(ap.Blocks); i++ { + for i := range ap.Blocks { a, b := ap.Blocks[i], bp.Blocks[i] if b.StartLine == a.StartLine &&