Add golangci linter setup

This commit is contained in:
Michael Hohn
2024-06-26 10:21:52 -07:00
committed by =Michael Hohn
parent d145731c4b
commit b543cebfac
2 changed files with 25 additions and 0 deletions

23
.golangci.yml Normal file
View File

@@ -0,0 +1,23 @@
linters:
enable:
- staticcheck
- unused
- decorder
- errchkjson
- exhaustruct
- gochecknoinits
- gochecksumtype
- goconst
- gocritic
- godox
- lll
- loggercheck
- sloglint
- tagalign
- unparam
linters-settings:
staticcheck:
checks:
- "SA"

View File

@@ -12,6 +12,8 @@ fullbuild:
sendsubmit: sendsubmit:
cd tools && sh ./submit-request.curl cd tools && sh ./submit-request.curl
# Requires
# go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
lint: lint:
golangci-lint run cmd/... pkg/... golangci-lint run cmd/... pkg/...