Skip to content

Commit

Permalink
GH-245: Added staticcheck to go.yml checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jirenius committed Jun 10, 2024
1 parent e900033 commit f4013d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '1.22.4'
- name: Install checks
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/client9/misspell/cmd/misspell@latest
- name: Go get
run: go get -t ./...
- name: Go Vet
Expand All @@ -62,7 +66,7 @@ jobs:
run: go mod tidy; git diff --exit-code go.mod go.sum
- name: Go FMT
run: go fmt $(go list ./... | grep -v /vendor/); git diff --exit-code
- name: Staticcheck
run: staticcheck -checks all,-ST1000 ./...
- name: Misspell
run: |
go install github.com/client9/misspell/cmd/misspell@latest
misspell -error -locale US .
run: misspell -error -locale US .
4 changes: 2 additions & 2 deletions scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ fi
echo "Checking with go vet..."
go vet ./...
echo "Checking with staticcheck..."
staticcheck ./...
staticcheck -checks all,-ST1000 ./...
echo "Checking with misspell..."
misspell -error -locale US .
misspell -error -locale US *.* docs examples/*/*.* logger nats scripts server test
7 changes: 2 additions & 5 deletions scripts/install-checks.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/bash -e

pushd /tmp > /dev/null
go get -u github.com/mattn/goveralls
go get -u honnef.co/go/tools/cmd/staticcheck
go get -u github.com/client9/misspell/cmd/misspell
popd > /dev/null
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/client9/misspell/cmd/misspell@latest

0 comments on commit f4013d4

Please sign in to comment.