-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
43 lines (31 loc) · 951 Bytes
/
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
VERBOSE := $(if ${CI},--verbose,)
COMMIT := $(shell git rev-parse --short HEAD)
check-fmt:
cargo +nightly fmt ${VERBOSE} --all -- --check
fmt:
cargo +nightly fmt ${VERBOSE} --all
clippy:
cargo clippy ${VERBOSE} --locked --all --all-targets --all-features -- \
-D warnings -D clippy::enum_glob_use
test:
cargo test ${VERBOSE} --all --all-targets
sort:
cargo sort -gw
check-sort:
cargo sort -gwc
info:
date
pwd
env
# For counting lines of code
stats:
@cargo count --version || cargo +nightly install --git https://github.com/kbknapp/cargo-count
@cargo count --separator , --unsafe-statistics
# Use cargo-audit to audit Cargo.lock for crates with security vulnerabilities
# expecting to see "Success No vulnerable packages found"
security-audit:
@cargo audit --version || cargo install cargo-audit
@cargo audit
.PHONY: build prod prod-test
.PHONY: fmt test clippy doc doc-deps doc-api check stats
.PHONY: ci info security-audit