chore: add golangci config
parent
b99e4d1947
commit
3c72e5b206
|
@ -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
|
5
Makefile
5
Makefile
|
@ -1,4 +1,6 @@
|
||||||
.PHONY: test coverage-cli coverate-html lint
|
.PHONY: all test coverage-cli coverate-html lint
|
||||||
|
|
||||||
|
all: test lint
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -race -coverprofile=coverage.out ./...
|
go test -race -coverprofile=coverage.out ./...
|
||||||
|
@ -11,4 +13,3 @@ coverage-html: test
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
golangci-lint run ./...
|
golangci-lint run ./...
|
||||||
semgrep --config auto
|
|
||||||
|
|
Loading…
Reference in New Issue