Skip to content

Commit 4e67a1e

Browse files
committed
Updated Makefile
1 parent f5c2ab7 commit 4e67a1e

1 file changed

Lines changed: 78 additions & 11 deletions

File tree

Makefile

Lines changed: 78 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
1-
.PHONY: clean build test build_test fmt clippy create_docs ayce default help docs
1+
.PHONY: default help clean build test build_test fmt clippy update tree tree-duplicates deny audit unused-deps create_docs docs install-tools watch install-watch ayce
22

33
# Default target
44
default: ayce
55

66
# Display help information
77
help:
88
@echo "Available targets:"
9-
@echo " make build - Build the project"
10-
@echo " make clean - Clean build artifacts"
11-
@echo " make test - Run tests"
12-
@echo " make build_test - Clean once, then build and test"
13-
@echo " make fmt - Format code"
14-
@echo " make clippy - Run clippy linter"
15-
@echo " make create_docs - Create documentation"
16-
@echo " make docs - Create docs and open in browser (macOS/Linux)"
17-
@echo " make ayce - Run all checks (fmt → build_test → clippy → create_docs)"
18-
@echo " make help - Display this help message"
9+
@echo ""
10+
@echo "Build & Test:"
11+
@echo " make build - Build the project"
12+
@echo " make test - Run tests"
13+
@echo " make build_test - Clean once, then build and test"
14+
@echo " make clean - Clean build artifacts"
15+
@echo " make ayce - Run all checks (fmt -> build_test -> clippy -> create_docs)"
16+
@echo ""
17+
@echo "Code Quality & Security:"
18+
@echo " make fmt - Format code"
19+
@echo " make clippy - Run clippy linter"
20+
@echo " make update - Update dependencies"
21+
@echo " make tree - Show workspace dependency tree"
22+
@echo " make tree-duplicates - Show duplicate dependencies"
23+
@echo " make deny - Run cargo-deny checks"
24+
@echo " make audit - Run advisory security audit"
25+
@echo " make unused-deps - Check for unused dependencies (nightly)"
26+
@echo ""
27+
@echo "Documentation:"
28+
@echo " make create_docs - Create documentation"
29+
@echo " make docs - Create docs and open in browser (macOS/Linux)"
30+
@echo ""
31+
@echo "Tooling:"
32+
@echo " make install-tools - Install cargo-deny and cargo-udeps"
33+
@echo " make watch - Run check/test in watch mode"
34+
@echo " make install-watch - Install cargo-watch"
35+
@echo ""
36+
@echo "Meta:"
37+
@echo " make help - Display this help message"
1938

2039
# Clean build artifacts
2140
clean:
@@ -40,6 +59,36 @@ fmt:
4059
clippy:
4160
cargo clippy -- -W clippy::pedantic
4261

62+
# Update dependencies
63+
update:
64+
@echo "Updating dependencies..."
65+
cargo update
66+
67+
# Show dependency tree
68+
tree:
69+
@echo "Showing dependency tree..."
70+
cargo tree --workspace
71+
72+
# Show duplicate dependencies
73+
tree-duplicates:
74+
@echo "Showing duplicate dependencies..."
75+
cargo tree --workspace --duplicates
76+
77+
# Security checks with cargo-deny
78+
deny:
79+
@echo "Running cargo-deny checks..."
80+
cargo deny check
81+
82+
# Security audit with cargo-deny (advisories only)
83+
audit:
84+
@echo "Running security audit..."
85+
cargo deny check advisories
86+
87+
# Check for unused dependencies (requires nightly)
88+
unused-deps:
89+
@echo "Checking for unused dependencies..."
90+
cargo +nightly udeps --workspace --all-features
91+
4392
# Create documentation
4493
create_docs:
4594
cargo doc --no-deps
@@ -57,5 +106,23 @@ docs: create_docs
57106
exit 1; \
58107
fi
59108

109+
# Install required tools
110+
install-tools:
111+
@echo "Installing development tools..."
112+
cargo install cargo-deny
113+
cargo install cargo-udeps
114+
@echo ""
115+
@echo "✓ Tools installed!"
116+
@echo ""
117+
118+
# Watch mode for development (requires cargo-watch)
119+
watch:
120+
cargo watch -x "check --workspace" -x "test --workspace"
121+
122+
# Install cargo-watch
123+
install-watch:
124+
cargo install cargo-watch
125+
126+
60127
# All You Can Eat - Run all checks
61128
ayce: fmt build_test clippy create_docs

0 commit comments

Comments
 (0)