analysis.go: use x/tools/go/analysis/multichecker to run analysis tools

This pattern has a number of advantages: it tracks the versions of the
tools in go.mod, it doesn't require installing anything in CI, it runs
all analysis passes at once, and it lets us add custom ones easily.
This commit is contained in:
Filippo Valsorda
2019-11-09 15:57:16 -05:00
committed by Filippo Valsorda
parent 4ffcbacbb0
commit 82ea753aa2
4 changed files with 107 additions and 8 deletions

View File

@@ -1,11 +1,8 @@
language: go
sudo: false
go: stable
install: (cd && go get honnef.co/go/tools/cmd/staticcheck)
script:
- go vet
- staticcheck ./...
- go run analysis.go ./...
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "mkcert-$(git describe --tags)-linux-amd64"
- CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -o "mkcert-$(git describe --tags)-linux-arm"
- CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o "mkcert-$(git describe --tags)-darwin-amd64"