github.com/databricks/cli@v0.203.0/Makefile (about) 1 default: build 2 3 fmt: 4 @echo "✓ Formatting source code with goimports ..." 5 @goimports -w $(shell find . -type f -name '*.go' -not -path "./vendor/*") 6 @echo "✓ Formatting source code with gofmt ..." 7 @gofmt -w $(shell find . -type f -name '*.go' -not -path "./vendor/*") 8 9 lint: vendor 10 @echo "✓ Linting source code with https://staticcheck.io/ ..." 11 @staticcheck ./... 12 13 test: lint 14 @echo "✓ Running tests ..." 15 @gotestsum --format pkgname-and-test-fails --no-summary=skipped --raw-command go test -v -json -short -coverprofile=coverage.txt ./... 16 17 coverage: test 18 @echo "✓ Opening coverage for unit tests ..." 19 @go tool cover -html=coverage.txt 20 21 build: vendor 22 @echo "✓ Building source code with go build ..." 23 @go build -mod vendor 24 25 snapshot: 26 @echo "✓ Building dev snapshot" 27 @goreleaser build --snapshot --clean --single-target 28 29 vendor: 30 @echo "✓ Filling vendor folder with library code ..." 31 @go mod vendor 32 33 .PHONY: build vendor coverage test lint fmt