forked from drmingdrmer/validit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 1019 Bytes
/
Makefile
File metadata and controls
45 lines (33 loc) · 1019 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
44
45
all: test check_all
check_all: lint fmt doc unused_dep typos
test:
cargo test
cargo +nightly test --features backtrace
bench:
cargo bench --features bench
fmt:
cargo +nightly fmt
fix:
cargo fix --allow-staged
doc:
RUSTDOCFLAGS="-D warnings" cargo +nightly doc --document-private-items --all --all-features --no-deps
check_missing_doc:
# Warn about missing doc for public API
RUSTDOCFLAGS="-W missing_docs" cargo +nightly doc --all --all-features --no-deps
lint:
cargo +nightly fmt
cargo +nightly clippy --no-deps --all-targets -- -D warnings
# Bug: clippy --all-targets reports false warning about unused dep in
# `[dev-dependencies]`:
# https://github.com/rust-lang/rust/issues/72686#issuecomment-635539688
# Thus we only check unused deps for lib
RUSTFLAGS=-Wunused-crate-dependencies cargo +nightly clippy --no-deps --lib -- -D warnings
unused_dep:
cargo machete
typos:
# cargo install typos-cli
typos --write-changes
# typos
clean:
cargo clean
.PHONY: test fmt lint clean doc guide