diff --git a/.golangci.yml b/.golangci.yml index f57c1d5..2b61f13 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,69 +1,74 @@ -run: - allow-parallel-runners: true - -issues: - exclude: - - "if statements should only be cuddled with assignments" # from wsl - - "if statements should only be cuddled with assignments used in the if statement itself" # from wsl - - "assignments should only be cuddled with other assignments" # from wsl. false positive case: var a bool\nb := true - - "declarations should never be cuddled" # from wsl - # don't skip warning about doc comments - # don't exclude the default set of lint - exclude-use-default: false - # restore some of the defaults - # (fill in the rest as needed) - exclude-rules: - - path: internal/* - linters: - - dupl +linters: + enable-all: true + disable: + - depguard + - exportloopref + - execinquery + - gomnd + - funlen + - containedctx + - exhaustruct + - testpackage + - varnamelen + - maintidx + - err113 + - nlreturn + - wrapcheck + - tagliatelle + - paralleltest + - lll + - contextcheck + - gochecknoglobals + - tagalign + - nilnil + - godot + - godox + - gci + - gocognit + - gocyclo + - cyclop + - ireturn + - gofumpt + - gochecknoinits linters-settings: wsl: allow-assign-and-call: false strict-append: false + allow-trailing-comment: true + allow-cuddle-declarations: true + allow-separated-leading-comment: true revive: rules: - name: blank-imports disabled: true + nestif: + # Minimal complexity of if statements to report. + # Default: 5 + min-complexity: 9 + dupl: + # Tokens count to trigger issue. + # Default: 150 + threshold: 600 + mnd: + ignored-functions: + - "context.WithTimeout" + - "strconv.ParseComplex" + ignored-files: + - "examples/.*" + gocritic: + disabled-checks: + - ifElseChain + gosec: + excludes: + - G115 -linters: - disable-all: true - enable: - - dupl - - errcheck - - exportloopref - - goconst - - gocyclo - - gofmt - - goimports - - gosimple - - govet - - ineffassign - # - lll - - misspell - - nakedret - - prealloc - - staticcheck - - typecheck - - unconvert - - unparam - - unused - - containedctx - - durationcheck - - errname - - exhaustive - - forcetypeassert - - goheader - - goprintffuncname - # - gosec - - musttag - - nestif - - nolintlint - - nosprintfhostport - - predeclared - - reassign - - revive - - tenv - - testableexamples - - whitespace - - wsl +issues: + exclude: + - "if statements should only be cuddled with assignments" # from wsl + - "if statements should only be cuddled with assignments used in the if statement itself" # from wsl + - "assignments should only be cuddled with other assignments" # from wsl. false positive case: var a bool\nb := true + exclude-rules: + - path: _test\.go + linters: + - perfsprint diff --git a/cspell.config.yaml b/cspell.config.yaml index ac5aab3..5a8b4a2 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -3,43 +3,67 @@ ignorePaths: [] dictionaryDefinitions: [] dictionaries: [] words: + - containedctx + - contextcheck + - cyclop + - depguard - dupl + - durationcheck - errcheck + - errname + - execinquery + - exhaustive + - exhaustruct - exportloopref + - forcetypeassert + - funlen + - gochecknoglobals + - gochecknoinits + - gocognit - goconst + - gocritic - gocyclo + - godox - gofmt + - gofumpt + - goheader - goimports + - gomnd + - goprintffuncname + - gosec - gosimple - govet - ineffassign + - ireturn - lll + - maintidx - misspell - - nakedret - - prealloc - - staticcheck - - typecheck - - unconvert - - unparam - - unused - - containedctx - - durationcheck - - errname - - exhaustive - - forcetypeassert - - goheader - - goprintffuncname - - gosec - musttag + - nakedret - nestif + - nilnil + - nlreturn - nolintlint - nosprintfhostport + - paralleltest + - perfsprint + - prealloc - predeclared - reassign - revive + - staticcheck + - strconv + - tagalign - tenv - testableexamples + - testpackage + - typecheck + - unconvert + - unparam + - unused + - varnamelen - whitespace + - wrapcheck - wsl ignoreWords: [] import: []