forked from gitleaks/gitleaks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 831 Bytes
/
Makefile
File metadata and controls
37 lines (27 loc) · 831 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
37
.PHONY: test test-cover failfast profile clean format build
PKG=github.com/zricethezav/gitleaks
VERSION := `git fetch --tags && git tag | sort -V | tail -1`
LDFLAGS=-ldflags "-X=github.com/zricethezav/gitleaks/v8/version.Version=$(VERSION)"
COVER=--cover --coverprofile=cover.out
test-cover:
go test -v ./... --race $(COVER) $(PKG)
go tool cover -html=cover.out
format:
go fmt ./...
test: config/gitleaks.toml format
go test -v ./... --race $(PKG)
failfast: format
go test -failfast ./...
build: config/gitleaks.toml format
go mod tidy
go build $(LDFLAGS)
lint:
golangci-lint run
clean:
rm -rf profile
find . -type f -name '*.got.*' -delete
find . -type f -name '*.out' -delete
profile: build
./scripts/profile.sh './gitleaks' '.'
config/gitleaks.toml: $(wildcard cmd/generate/config/**/*)
go generate ./...