mirror of
https://github.com/sresarehumantoo/wsmancer.git
synced 2026-11-24 05:49:16 +01:00
Add golangci-lint to CI
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user