chore: sync golangci-lint config

main
sudo pacman -Syu 2024-05-08 01:15:51 +07:00
parent d07b8c34d4
commit 5cfbe4211b
1 changed files with 44 additions and 17 deletions

View File

@ -1,14 +1,6 @@
run:
timeout: 5m
tests: false
skip-dirs:
- ".*test.*"
- ".*mock.*"
- ".*generated.*"
- ".*example.*"
skip-files:
- ".*Mock.*"
- ".*_mock.*"
- ".*_generated.*"
output:
sort-results: true
@ -16,32 +8,35 @@ output:
linters:
disable-all: true
enable:
# Default
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
# Custom
- err113
- errchkjson
- errname
- errorlint
- execinquery
- goerr113
- forcetypeassert
- gocritic
- gofumpt
- gosec
- importas
- makezero
- nilnil
- noctx
- prealloc
- reassign
- sqlclosecheck
- unconvert
fast: true
linters-settings:
gosec:
excludes:
- G402
- G501
- G505
exclude-generated: true
# Default
govet:
check-shadowing: false
disable-all: true
@ -63,3 +58,35 @@ linters-settings:
- unusedresult
staticcheck:
checks: ["all", "-SA1019"]
# Custom
gocritic:
disabled-checks:
- ifElseChain
- singleCaseSwitch
- unnamedResult
- whyNoLint
enabled-tags:
- diagnostic
- style
gosec:
excludes:
- G101
- G112
- G402
- G404
- G501
- G505
exclude-generated: true
reassign:
patterns:
- ".*"
issues:
exclude-dirs:
- ".*test.*"
- ".*mock.*"
- ".*example.*"
- ".*utils.*"
exclude-files:
- ".*Mock.*"
- ".*_mock.*"