From 07b047ab73f9babeedf06c8f8f815efbf21dd99b Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Tue, 16 Aug 2022 13:00:03 +0700 Subject: [PATCH] chore: update golangci config --- .golangci.yml | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..6f791d2 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,74 @@ +run: + tests: false + skip-dirs: + - ".*test.*" + - ".*mock.*" + - ".*generated.*" + - ".*example.*" + skip-files: + - ".*Mock.*" + - ".*_mock.*" + - ".*_generated.*" + go: "1.18" + +output: + sort-results: true + +linters: + disable-all: true + enable: + - deadcode + - errcheck + - gosimple + - govet + - staticcheck + - typecheck + - unused + - varcheck + - errname + - errorlint + - execinquery + - goerr113 + - gofumpt + - gosec + - ifshort + - importas + - makezero + - nilnil + - prealloc + - unconvert + fast: true + +linters-settings: + gosec: + excludes: + - G402 + - G501 + - G505 + exclude-generated: true + govet: + check-shadowing: false + disable-all: true + enable: + - assign + - atomic + - bools + - buildtag + - composites + - copylocks + - fieldalignment + - httpresponse + - loopclosure + - lostcancel + - nilfunc + - printf + - unmarshal + - unreachable + - unusedresult + staticcheck: + go: "1.18" + checks: ["all", "-SA1019"] + +issues: + new: true + fix: true