diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..6980ed0 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,77 @@ +run: + tests: true + timeout: 15m + allow-parallel-runners: true + build-tags: + - e2e + - ledger + - test_ledger_mock + +linters: + disable-all: true + enable: + - dogsled + - errcheck + - errorlint + - copyloopvar + - gci + - goconst + - gocritic + - gofumpt + - gosec + - gosimple + - govet + - ineffassign + - misspell + - nakedret + - nolintlint + - revive + - staticcheck + - stylecheck + - thelper + - typecheck + - unconvert + - unused + +issues: + exclude-dirs: + - docs + exclude-rules: + - text: "ST1003:" # We are fine with our current naming + linters: + - stylecheck + +linters-settings: + gci: + custom-order: true + sections: + - standard # Standard section: captures all standard packages. + - default # Default section: contains all imports that could not be matched to another section type. + - prefix(github.com/JulianToledano/goingecko) + revive: + rules: + - name: redefines-builtin-id + disabled: true + + gosec: + exclude-generated: true + confidence: medium + misspell: + locale: US + gofumpt: + extra-rules: true + dogsled: + max-blank-identifiers: 6 + nolintlint: + allow-unused: false + require-explanation: true + require-specific: false + gosimple: + checks: [ "all" ] + gocritic: + disabled-checks: + - regexpMust + - appendAssign + - ifElseChain + unused: + local-variables-are-used: false