diff --git a/.golangci.yml b/.golangci.yml index aeb2f81..82d1ddd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,80 +1,79 @@ -linters-settings: - govet: - check-shadowing: true - golint: - min-confidence: 0 - gocyclo: - min-complexity: 15 - maligned: - suggest-new: true - dupl: - threshold: 100 - goconst: - min-len: 2 - min-occurrences: 2 - misspell: - locale: US - lll: - line-length: 140 - goimports: - local-prefixes: ds2api - unused: - check-exported: false - unparam: - check-exported: false - nakedret: - max-func-lines: 30 - prealloc: - simple: true - range-loops: true - for-loops: false - gocritic: - enabled-tags: - - diagnostic - - experimental - - opinionated - - performance - - style - disabled-checks: - - wrapperFunc - - rangeValCopy - - hugeParam +version: "2" + +run: + tests: true linters: enable: - - govet - - errcheck - - staticcheck - - unused - - gosimple - - structcheck - - varcheck - - ineffassign - - deadcode - - typecheck + - asciicheck - bodyclose - - stylecheck - - revive - - unconvert + - dogsled - goconst - gocyclo - - asciicheck - - gofmt - misspell - nakedret - - exportloopref - - dogsled + - revive + - staticcheck + - unconvert + settings: + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 2 + gocritic: + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + disabled-checks: + - wrapperFunc + - rangeValCopy + - hugeParam + gocyclo: + min-complexity: 15 + lll: + line-length: 140 + misspell: + locale: US + nakedret: + max-func-lines: 30 + prealloc: + simple: true + range-loops: true + for-loops: false + unparam: + check-exported: false + exclusions: + generated: lax + rules: + - path: (.+)\.go$ + text: "ST1000: at least one file in a package should have a package comment" + paths: + - third_party$ + - builtin$ + - examples$ + - vendor$ + - webui/node_modules$ issues: - exclude-use-default: false max-issues-per-linter: 0 max-same-issues: 0 - exclude: - - "ST1000: at least one file in a package should have a package comment" -run: - timeout: 5m - tests: true - skip-dirs: - - vendor - - webui/node_modules +formatters: + enable: + - gofmt + settings: + goimports: + local-prefixes: + - ds2api + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ + - vendor$ + - webui/node_modules$