Add golangci-lint to CI

This commit is contained in:
SREsAreHumanToo
2026-11-21 11:03:08 -05:00
parent 9122066233
commit 448a8f50e0
3 changed files with 25 additions and 0 deletions
+4
View File
@@ -40,6 +40,10 @@ jobs:
run: test -z "$(gofmt -l cmd internal)" || { echo "gofmt needed:"; gofmt -l cmd internal; exit 1; }
- name: go vet
run: go vet ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
test:
runs-on: ubuntu-latest
+2
View File
@@ -32,6 +32,8 @@ lint:
script:
- test -z "$(gofmt -l cmd internal)" || { echo "gofmt needed:"; gofmt -l cmd internal; exit 1; }
- go vet ./...
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- golangci-lint run ./...
test:
stage: test
+19
View File
@@ -0,0 +1,19 @@
linters:
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
- gosec
disable-all: true
linters-settings:
gosec:
excludes:
- G404 # math/rand is used intentionally for obfuscation seeded from crypto/rand
issues:
exclude-dirs:
- dist