github.com/llimllib/devd@v0.0.0-20230426145215-4d29fc25f909/Makefile (about) 1 source = $(shell find . -iname '*.go' -type f) 2 3 .PHONY: install 4 install: $(source) 5 go install ./cmd/devd 6 7 .PHONY: test 8 test: 9 go test ./... 10 11 .PHONY: check 12 check: 13 @# install required tools if not found. Should pin versions if the latest 14 @# version ever starts to cause problems. 15 @command -v staticcheck 1>/dev/null || \ 16 go install honnef.co/go/tools/cmd/staticcheck@latest 17 @command -v govulncheck 1>/dev/null || \ 18 go install golang.org/x/vuln/cmd/govulncheck@latest 19 @# they recommend installing from your package manager instead, but this has 20 @# a hope of working cross-platform, so I'll put it here instead 21 @# https://golangci-lint.run/usage/install/ 22 @command -v golangci-lint 1>/dev/null || \ 23 go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.49.0 24 25 staticcheck ./... 26 govulncheck ./... 27 golangci-lint run