Add GolangCI configuration for linting and testing

This commit is contained in:
Mo Tarbin 2025-01-20 22:15:14 -05:00
parent aec90c3e51
commit 009954857c

48
.golangci.yaml Normal file
View 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.*"