Add GolangCI configuration for linting and testing
This commit is contained in:
parent
aec90c3e51
commit
009954857c
1 changed files with 48 additions and 0 deletions
48
.golangci.yaml
Normal file
48
.golangci.yaml
Normal file
|
@ -0,0 +1,48 @@
|
|||
run:
|
||||
timeout: 5m
|
||||
tests: true
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- govet
|
||||
- errcheck
|
||||
- staticcheck
|
||||
- gosimple
|
||||
- unused
|
||||
- ineffassign
|
||||
- unused
|
||||
- typecheck
|
||||
- gofmt
|
||||
- goimports
|
||||
- gocyclo
|
||||
- dupl
|
||||
- misspell
|
||||
- unconvert
|
||||
- nakedret
|
||||
- goconst
|
||||
- gocritic
|
||||
|
||||
linters-settings:
|
||||
gofmt:
|
||||
simplify: true
|
||||
|
||||
gocyclo:
|
||||
min-complexity: 15
|
||||
|
||||
dupl:
|
||||
threshold: 100
|
||||
|
||||
misspell:
|
||||
locale: US
|
||||
|
||||
issues:
|
||||
exclude-use-default: false
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- errcheck
|
||||
text: ".*error return value not checked.*"
|
||||
- linters:
|
||||
- dupl
|
||||
text: ".*duplicate of.*"
|
Loading…
Add table
Reference in a new issue