-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 738 Bytes
/
Makefile
File metadata and controls
36 lines (25 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.PHONY: build test lint clean install
BINARY_NAME=cryptoguard
VERSION=0.1.0
BUILD_DIR=build
LDFLAGS=-ldflags "-X main.version=$(VERSION)"
build:
go build $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/cryptoguard
test:
go test -v -count=1 ./...
coverage:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
lint:
golangci-lint run ./...
install:
go install $(LDFLAGS) ./cmd/cryptoguard
clean:
rm -rf $(BUILD_DIR) coverage.out coverage.html
test-vulnerable:
go run ./cmd/cryptoguard ./testdata/vulnerable/...
test-secure:
go run ./cmd/cryptoguard ./testdata/secure/...
sarif:
go run ./cmd/cryptoguard -format sarif ./testdata/vulnerable/... > results.sarif
all: lint test build