Debian Codegraph @

Makefile

raw symbols SCIP
1 .PHONY: default build test benchmark fmt vet
2
3 default: build
4
5 build:
6 go build ./...
7
8 test:
9 go test sigs.k8s.io/json/...
10
11 benchmark:
12 go test sigs.k8s.io/json -bench . -benchmem
13
14 fmt:
15 go mod tidy
16 gofmt -s -w *.go
17
18 vet:
19 go vet sigs.k8s.io/json
20
21 @echo "checking for external dependencies"
22 @deps=$$(go list -f '{{ if not (or .Standard .Module.Main) }}{{.ImportPath}}{{ end }}' -deps sigs.k8s.io/json/... || true); \
23 if [ -n "$${deps}" ]; then \
24 echo "only stdlib dependencies allowed, found:"; \
25 echo "$${deps}"; \
26 exit 1; \
27 fi
28
29 @echo "checking for unsafe use"
30 @unsafe=$$(go list -f '{{.ImportPath}} depends on {{.Imports}}' sigs.k8s.io/json/... | grep unsafe || true); \
31 if [ -n "$${unsafe}" ]; then \
32 echo "no dependencies on unsafe allowed, found:"; \
33 echo "$${unsafe}"; \
34 exit 1; \
35 fi