-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (35 loc) · 1.4 KB
/
Copy pathMakefile
File metadata and controls
49 lines (35 loc) · 1.4 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
.PHONY: lint lint-fmt lint-clippy lint-deny lint-machete lint-doc \
lint-fix test check ci
# ---------------------------------------------------------------------------
# Individual lint targets
# ---------------------------------------------------------------------------
lint-fmt:
cargo fmt --check
lint-clippy:
SQLX_OFFLINE=true cargo clippy --workspace --all-targets -- -D warnings
lint-deny:
cargo deny check
lint-machete:
cargo machete
lint-doc:
SQLX_OFFLINE=true RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items
# ---------------------------------------------------------------------------
# Composite targets
# ---------------------------------------------------------------------------
# Fast lint: fmt + clippy (seconds, no network)
lint: lint-fmt lint-clippy
# Full lint: everything including supply-chain and docs
lint-all: lint-fmt lint-clippy lint-deny lint-machete lint-doc
# Auto-fix what can be auto-fixed
lint-fix:
cargo fmt
cargo clippy --workspace --all-targets --fix --allow-dirty -- -D warnings
# ---------------------------------------------------------------------------
# Build & test
# ---------------------------------------------------------------------------
check:
SQLX_OFFLINE=true cargo check --workspace
test:
cargo test --workspace
# Mirror CI: the full sequence that must pass before merge
ci: lint-fmt lint-clippy lint-deny check test