diff --git a/backend/.golangci.yml b/backend/.golangci.yml new file mode 100644 index 0000000..fc10ed9 --- /dev/null +++ b/backend/.golangci.yml @@ -0,0 +1,66 @@ +version: "2" +run: + go: "1.25" + tests: true +linters: + enable: + - bodyclose + - dupl + - exhaustive + - goconst + - gocyclo + - gosec + - lll + - misspell + - noctx + - prealloc + - unconvert + settings: + dupl: + threshold: 150 + goconst: + min-len: 3 + min-occurrences: 3 + gocyclo: + min-complexity: 15 + gosec: + excludes: + - G104 # Unhandled errors (we use errcheck) + lll: + line-length: 120 + misspell: + locale: US + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - linters: + - dupl + - errcheck + - gocyclo + - gosec + path: _test\.go + - linters: + - gocyclo + path: cmd/main\.go + paths: + - third_party$ + - builtin$ + - examples$ +issues: + max-issues-per-linter: 50 + max-same-issues: 10 +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$