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