-
Notifications
You must be signed in to change notification settings - Fork 901
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (51 loc) · 1.78 KB
/
Makefile
File metadata and controls
63 lines (51 loc) · 1.78 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
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
# Check all rust code - formatting, cargo check, and clippy.
.PHONY: all
all: fmt fmt-check check clippy
# Perform any automated formatting or clippy fixes that are available.
.PHONY: fix
fix: clippy-fix fmt
# Smaller - sub-checks
# Format: code to match rustfmt configuration.
.PHONY: fmt
fmt:
cargo fmt
# Lint: code to ensure it matches our rustfmt configuration.
.PHONY: fmt-check
fmt-check:
cargo fmt --check --all
# Lint: code to ensure there are no compiler errors or warnings.
.PHONY: check
check:
cargo check --workspace --all-targets
# Lint: code to ensure rust best practices are observed.
.PHONY: clippy
clippy:
cargo clippy --workspace --all-targets -- -D warnings
# An alias for nextest
.PHONY: test
test: nextest
# CI executes this to build a version of `but` without any legacy code.
.PHONY: check-modern-but
check-modern-but:
cargo check -p but --all-targets --no-default-features
# CI executes this to test a version of `but` without any legacy code.
.PHONY: test-modern-but
test-modern-but:
cargo test -p but --no-default-features
# Run all tests in the entire workspace and show all failures in the end.
.PHONY: nextest
nextest:
cargo nextest run --workspace --no-fail-fast
# Format: clippy issues --allow-dirty allows the fix to be run even with a dirty
# working tree which can technically cause code to break, but I've never seen it
# happen in practice.
.PHONY: clippy-fix
clippy-fix:
cargo clippy --workspace --all-targets --fix --allow-dirty
# Test: compile-time coverage for `but-api-macros` across relevant feature combinations.
.PHONY: test-but-api-macros
test-but-api-macros:
cargo test -p but-api-macros-tests
cargo test -p but-api-macros-tests --features legacy
cargo test -p but-api-macros-tests --features tauri
cargo test -p but-api-macros-tests --features napi