chore: update golangci config

main
sudo pacman -Syu 2022-08-16 13:00:03 +07:00
parent ef6e0cd582
commit 07b047ab73
No known key found for this signature in database
GPG Key ID: D6CB5C6C567C47B0
1 changed files with 74 additions and 0 deletions

74
.golangci.yml Normal file
View File

@ -0,0 +1,74 @@
run:
tests: false
skip-dirs:
- ".*test.*"
- ".*mock.*"
- ".*generated.*"
- ".*example.*"
skip-files:
- ".*Mock.*"
- ".*_mock.*"
- ".*_generated.*"
go: "1.18"
output:
sort-results: true
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- staticcheck
- typecheck
- unused
- varcheck
- errname
- errorlint
- execinquery
- goerr113
- gofumpt
- gosec
- ifshort
- importas
- makezero
- nilnil
- prealloc
- unconvert
fast: true
linters-settings:
gosec:
excludes:
- G402
- G501
- G505
exclude-generated: true
govet:
check-shadowing: false
disable-all: true
enable:
- assign
- atomic
- bools
- buildtag
- composites
- copylocks
- fieldalignment
- httpresponse
- loopclosure
- lostcancel
- nilfunc
- printf
- unmarshal
- unreachable
- unusedresult
staticcheck:
go: "1.18"
checks: ["all", "-SA1019"]
issues:
new: true
fix: true