From 6023394b0affe4f47bea099b18f8d536cb83fd0e Mon Sep 17 00:00:00 2001 From: Dzyanis Kuzmenka Date: Thu, 17 Mar 2022 11:42:43 +0300 Subject: [PATCH] add golangci config --- .golangci.yml | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..98707f7 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,90 @@ +run: + modules-download-mode: readonly + issues-exit-code: 0 + +linters-settings: + exhaustive: + default-signifies-exhaustive: false + gci: + sections: + - standard + - default + - prefix(github.com/messagebird/sachet) + goconst: + min-occurrences: 5 + ignore-tests: true + godot: + scope: toplevel + exclude: + - go-sumtype:decl + - check interfaces + capital: true + godox: + keywords: + - BUG + - FIXME + - HACK + goimports: + local-prefixes: github.com/messagebird/sachet + gosimple: + go: "1.18" + checks: ["all"] + lll: + line-length: 130 + tab-width: 4 + nolintlint: + allow-unused: false + allow-leading-space: false + allow-no-explanation: [] + require-explanation: true + require-specific: true + staticcheck: + go: "1.18" + checks: ["all"] + stylecheck: + go: "1.18" + checks: ["all"] + dot-import-whitelist: [] + initialisms: [] + http-status-code-whitelist: [] + unparam: + check-exported: true + unused: + go: "1.18" + whitespace: + multi-if: false + multi-func: false + tagliatelle: + +linters: + enable-all: true + disable: + # TODO: enable one by one + - gci + - ireturn + - forbidigo + - containedctx + - tagliatelle + - cyclop + - errcheck + - exhaustivestruct + - forcetypeassert + - funlen + - gochecknoglobals + - gochecknoinits + - goerr113 + - gomnd + - gosec + - revive + - varnamelen + - wrapcheck + - noctx + - staticcheck + - stylecheck + - golint + - interfacer + - maligned + - nlreturn + - scopelint + - testpackage + - wsl