chore: update lint

main
sudo pacman -Syu 2023-02-25 23:30:39 +07:00
parent 0e2ed5bb69
commit 017525239f
1 changed files with 21 additions and 11 deletions

View File

@ -1,10 +1,12 @@
run: run:
timeout: 2m
tests: false tests: false
skip-dirs: skip-dirs:
- ".*test.*" - ".*test.*"
- ".*mock.*" - ".*mock.*"
- ".*generated.*" - ".*generated.*"
- ".*example.*" - ".*example.*"
- ".*utils.*"
skip-files: skip-files:
- ".*Mock.*" - ".*Mock.*"
- ".*_mock.*" - ".*_mock.*"
@ -16,6 +18,7 @@ output:
linters: linters:
disable-all: true disable-all: true
enable: enable:
# Default
- errcheck - errcheck
- gosimple - gosimple
- govet - govet
@ -23,31 +26,30 @@ linters:
- staticcheck - staticcheck
- typecheck - typecheck
- unused - unused
# Custom
- errchkjson - errchkjson
- errname - errname
- errorlint - errorlint
- execinquery - execinquery
- forcetypeassert
- gocritic - gocritic
- goerr113 - goerr113
- gofumpt - gofumpt
- gomodguard
- gosec - gosec
- importas - importas
- makezero - makezero
- nilnil - nilnil
- 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
@ -67,9 +69,17 @@ linters-settings:
- unmarshal - unmarshal
- unreachable - unreachable
- unusedresult - unusedresult
staticcheck: # Custom
checks: ["all", "-SA1019"]
gocritic: gocritic:
disabled-checks:
- ifElseChain
- singleCaseSwitch
enabled-tags: enabled-tags:
- diagnostic
- style - style
- performance - performance
gosec:
exclude-generated: true
reassign:
patterns:
- ".*"