-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
33 lines (27 loc) · 906 Bytes
/
Makefile
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
.PHONY: test
test:
go test -race -coverprofile=coverage.txt -covermode=atomic ./ ./internal/completion/ ./internal/option ./internal/help ./dag ./internal/sliceiterator ./text
cd examples/complex && go build . && cd ../..
cd examples/dag && go build . && cd ../..
cd examples/myscript && go build . && cd ../..
cd docs/tool && go build . && cd ../..
cd docs/script && go build . && cd ../..
race:
go test -race ./dag -count=1
view: test
go tool cover -html=coverage.txt -o coverage.html
# Assumes github.com/dgryski/semgrep-go is checked out in ../
rule-check:
semgrep -f ../semgrep-go .
for dir in ./ ./internal/completion ./internal/option ./internal/help ./dag ; do \
echo $$dir ; \
ruleguard -c=0 -rules ../semgrep-go/ruleguard.rules.go $$dir ; \
done
lint:
golangci-lint run --enable-all \
-D funlen \
-D dupl \
-D lll \
-D gocognit \
-D exhaustivestruct \
-D cyclop