diff --git a/.golangci.yml b/.golangci.yml index f70a1af9..3b014888 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -41,6 +41,9 @@ linters-settings: disabled-checks: - wrapperFunc - dupImport # https://github.com/go-critic/go-critic/issues/845 + funlen: + lines: 100 + statements: 50 linters: # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint @@ -49,11 +52,10 @@ linters: - bodyclose - deadcode - depguard - # - dogsled - TODO: enable it when golangci.com will support it. + - dogsled - dupl - errcheck - # - funlen - TODO: enable it when golangci.com will support it. - # - godox - TODO: enable it when golangci.com will support it. + - funlen - gochecknoinits - goconst - gocritic @@ -78,9 +80,10 @@ linters: - unparam - unused - varcheck - # - whitespace - TODO: enable it when golangci.com will support it. + - whitespace # don't enable: + # - godox # - maligned,prealloc # - gochecknoglobals @@ -98,6 +101,6 @@ issues: # golangci.com configuration # https://github.com/golangci/golangci/wiki/Configuration service: - golangci-lint-version: 1.17.x # use the fixed version to not introduce new linters unexpectedly + golangci-lint-version: 1.19.x # use the fixed version to not introduce new linters unexpectedly prepare: - echo "here I can run custom commands, but no preparation needed for this repo" diff --git a/README.md b/README.md index 579d6977..ddf34029 100644 --- a/README.md +++ b/README.md @@ -917,6 +917,9 @@ linters-settings: disabled-checks: - wrapperFunc - dupImport # https://github.com/go-critic/go-critic/issues/845 + funlen: + lines: 100 + statements: 50 linters: # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint @@ -925,11 +928,10 @@ linters: - bodyclose - deadcode - depguard - # - dogsled - TODO: enable it when golangci.com will support it. + - dogsled - dupl - errcheck - # - funlen - TODO: enable it when golangci.com will support it. - # - godox - TODO: enable it when golangci.com will support it. + - funlen - gochecknoinits - goconst - gocritic @@ -954,9 +956,10 @@ linters: - unparam - unused - varcheck - # - whitespace - TODO: enable it when golangci.com will support it. + - whitespace # don't enable: + # - godox # - maligned,prealloc # - gochecknoglobals @@ -974,7 +977,7 @@ issues: # golangci.com configuration # https://github.com/golangci/golangci/wiki/Configuration service: - golangci-lint-version: 1.17.x # use the fixed version to not introduce new linters unexpectedly + golangci-lint-version: 1.19.x # use the fixed version to not introduce new linters unexpectedly prepare: - echo "here I can run custom commands, but no preparation needed for this repo" ``` diff --git a/pkg/golinters/dogsled.go b/pkg/golinters/dogsled.go index 68237cc0..e98d1463 100644 --- a/pkg/golinters/dogsled.go +++ b/pkg/golinters/dogsled.go @@ -21,7 +21,6 @@ func (Dogsled) Desc() string { } func (d Dogsled) Run(ctx context.Context, lintCtx *linter.Context) ([]result.Issue, error) { - var res []result.Issue for _, f := range lintCtx.ASTCache.GetAllValidFiles() { v := returnsVisitor{