mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Switch to golangci-lint
This commit is contained in:
@@ -3,17 +3,12 @@
|
||||
set -e
|
||||
|
||||
if [ "$1" = "compile" ]; then
|
||||
|
||||
# We will compile and run some vet, spelling and some other checks.
|
||||
|
||||
go install honnef.co/go/tools/cmd/staticcheck@latest;
|
||||
go install github.com/client9/misspell/cmd/misspell@latest;
|
||||
GO_LIST=$(go list ./...);
|
||||
# First check that NATS builds.
|
||||
go build;
|
||||
$(exit $(go fmt $GO_LIST | wc -l));
|
||||
go vet $GO_LIST;
|
||||
find . -type f -name "*.go" | xargs misspell -error -locale US;
|
||||
staticcheck -tags=js_chaos_tests $GO_LIST
|
||||
|
||||
# Now run the linters.
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1
|
||||
golangci-lint run;
|
||||
if [ "$TRAVIS_TAG" != "" ]; then
|
||||
go test -race -v -run=TestVersionMatchesTag ./server -count=1 -vet=off
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user