-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 1.32 KB
/
Copy pathMakefile
File metadata and controls
35 lines (29 loc) · 1.32 KB
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
.PHONY: dev pre-commit check test
.DEFAULT: help
help:
@echo "make dev"
@echo " setup development environment"
@echo "make pre-commit"
@echo " run pre-commit hooks"
@echo "make check"
@echo " execute odin check"
@echo "make test"
@echo " execute all tests"
check-pre-commit:
ifeq (, $(shell which pre-commit))
$(error "pre-commit not in $(PATH), pre-commit (https://pre-commit.com) is required")
endif
dev: check-pre-commit
pre-commit install
pre-commit: check-pre-commit
pre-commit run --all-files
check:
odin check . -disallow-do -no-entry-point -strict-style -vet -vet-style -vet-tabs -warnings-as-errors
odin check examples/basic -disallow-do -strict-style -vet -vet-style -vet-tabs -warnings-as-errors
odin check examples/dns -disallow-do -strict-style -vet -vet-style -vet-tabs -warnings-as-errors
odin check examples/ip -disallow-do -strict-style -vet -vet-style -vet-tabs -warnings-as-errors
odin check examples/ipam -disallow-do -strict-style -vet -vet-style -vet-tabs -warnings-as-errors
odin check examples/ipset -disallow-do -strict-style -vet -vet-style -vet-tabs -warnings-as-errors
odin check examples/mac -disallow-do -strict-style -vet -vet-style -vet-tabs -warnings-as-errors
test:
odin test tests/ -all-packages -disallow-do -sanitize:address -strict-style -vet -vet-style -vet-tabs -warnings-as-errors