diff --git a/.golangci.yml b/.golangci.yml index 4e03a03..f758fa3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,14 +1,14 @@ run: + timeout: 5m tests: false skip-dirs: - ".*test.*" - ".*mock.*" - - ".*generated.*" - ".*example.*" + - ".*utils.*" skip-files: - ".*Mock.*" - ".*_mock.*" - - ".*_generated.*" output: sort-results: true @@ -16,6 +16,7 @@ output: linters: disable-all: true enable: + # Default - errcheck - gosimple - govet @@ -23,10 +24,12 @@ linters: - staticcheck - typecheck - unused + # Custom - errchkjson - errname - errorlint - execinquery + - forcetypeassert - gocritic - goerr113 - gofumpt @@ -34,20 +37,17 @@ linters: - importas - makezero - nilnil + - noctx - prealloc + - reassign + # - rowserrcheck + - sqlclosecheck - unconvert + # - wastedassign fast: true linters-settings: - gosec: - excludes: - - G101 - - G112 - - G402 - - G404 - - G501 - - G505 - exclude-generated: true + # Default govet: check-shadowing: false disable-all: true @@ -69,7 +69,25 @@ linters-settings: - unusedresult staticcheck: checks: ["all", "-SA1019"] + # Custom gocritic: + disabled-checks: + - ifElseChain + - singleCaseSwitch + - unnamedResult + - whyNoLint enabled-tags: + - diagnostic - style - - performance + gosec: + excludes: + - G101 + - G112 + - G402 + - G404 + - G501 + - G505 + exclude-generated: true + reassign: + patterns: + - ".*"