diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..d3c65d5 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,103 @@ +linters-settings: + dupl: + threshold: 100 + funlen: + lines: 100 + statements: 50 + gci: + local-prefixes: github.com/udemy/schema-vault + goconst: + min-len: 2 + min-occurrences: 2 + gocritic: + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + disabled-checks: + - dupImport + - ifElseChain + - octalLiteral + - whyNoLint + - wrapperFunc + settings: + rangeValCopy: + sizeThreshold: 512 + gocyclo: + min-complexity: 15 + goimports: + local-prefixes: github.com/udemy/schema-vault + golint: + min-confidence: 0 + gomnd: + settings: + mnd: + checks: argument,case,condition,return + govet: + check-shadowing: true + maligned: + suggest-new: true + misspell: + locale: US + nolintlint: + allow-leading-space: true + allow-unused: false + require-explanation: false + require-specific: false +linters: + disable-all: true + enable: + - bodyclose + - deadcode + - depguard + - dogsled + - dupl + - errcheck + - exhaustive + - funlen + - gochecknoinits + - goconst + - gocritic + - gocyclo + - goimports + - gofmt + - golint + - gomnd + - goprintffuncname + - gosec + - gosimple + - govet + - ineffassign + - interfacer + - misspell + - nakedret + - noctx + - nolintlint + - rowserrcheck + - scopelint + - staticcheck + - structcheck + - stylecheck + - typecheck + - unconvert + - unparam + - unused + - varcheck + - whitespace +issues: + exclude-rules: + - path: _test\.go + linters: + - gomnd + - linters: + - gocritic + text: "unnecessaryDefer:" +run: + timeout: 1m + issues-exit-code: 1 + tests: true + skip-dirs-use-default: true + allow-parallel-runners: true +