chore: sync golangci-lint

main
sudo pacman -Syu 2023-06-29 14:21:58 +07:00
parent 08942798d0
commit fe069a2dcb
1 changed files with 30 additions and 12 deletions

View File

@ -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:
- ".*"