-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (65 loc) · 1.63 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.PHONY: fmt
fmt:
cargo +nightly fmt
.PHONY: lint-toml
lint-toml: ensure-dprint
dprint fmt
ensure-dprint:
@if ! command -v dprint &> /dev/null; then \
echo "dprint not found. Please install it by running the command `cargo install --locked dprint` or refer to the following link for more information: https://github.com/dprint/dprint" \
exit 1; \
fi
.PHONY: clippy
clippy:
cargo +nightly clippy \
--workspace \
--lib \
--examples \
--tests \
--benches \
--all-features \
-- -D warnings
.PHONY: clippy-fix
clippy-fix:
cargo +nightly clippy \
--workspace \
--lib \
--examples \
--tests \
--benches \
--all-features \
--fix \
-- -D warnings
.PHONY: udeps
udeps:
cargo +nightly udeps --workspace --lib --examples --tests --benches --all-features --locked
.PHONY: codespell
codespell: ensure-codespell
codespell --skip "*.json"
ensure-codespell:
@if ! command -v codespell &> /dev/null; then \
echo "codespell not found. Please install it by running the command `pip install codespell` or refer to the following link for more information: https://github.com/codespell-project/codespell" \
exit 1; \
fi
.PHONY: zepter
zepter: ensure-zepter
zepter run check
ensure-zepter:
@if ! command -v zepter &> /dev/null; then \
echo "zepter not found. Please follow the instructions for installation: https://github.com/ggwpez/zepter?tab=readme-ov-file#install" \
exit 1; \
fi
.PHONY: lint
lint: fmt lint-toml clippy udeps codespell zepter
.PHONY: test
test:
cargo test \
--workspace \
--locked \
--all-features \
--no-fail-fast
.PHONY: docs
docs:
cargo docs --document-private-items
.PHONY: pr
pr: lint test docs