-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (27 loc) · 763 Bytes
/
Makefile
File metadata and controls
43 lines (27 loc) · 763 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
38
39
40
41
42
43
.PHONY: all check check-format format test lint fix clean test-bazel tidy
all: tidy format test fix
tidy: MODULE.bazel.lock go.sum
MODULE.bazel.lock: MODULE.bazel go.sum
bazel mod tidy
check: check-format test lint
check-format:
bazel test //tools/format/...:all
format:
bazel run //tools/format
test: test-bazel
lint: lint-go
# Target fix is best-effort autofix for lint issues. If autofix is not
# available, it still runs lint checks.
fix: fix-go
test-bazel:
bazel test //...
# Go lint and fix isn't integrated with bazel yet. Nogo is a good option.
.PHONY: lint-go fix-go
lint-go: go.sum
golangci-lint run ./...
fix-go: go.sum
golangci-lint run --fix ./...
go.sum: go.mod
bazel run @rules_go//go -- mod tidy
clean:
bazel clean --async