-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (48 loc) · 1.2 KB
/
Makefile
File metadata and controls
57 lines (48 loc) · 1.2 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
# Copyright (C) 2025 Verseles
# SPDX-License-Identifier: AGPL-3.0
.PHONY: precommit fmt clippy test audit build release clean
# Run all CI checks locally before committing
precommit: fmt clippy test audit
@echo ""
@echo "✅ All checks passed!"
@echo ""
# Check formatting
fmt:
@echo "📝 Checking formatting..."
@cargo fmt --check
@echo "✓ Formatting OK"
@echo ""
# Run Clippy linter
clippy:
@echo "🔬 Running Clippy..."
@cargo clippy --all-targets --all-features -- -D warnings
@echo "✓ Clippy OK"
@echo ""
# Run tests
test:
@echo "🧪 Running tests..."
@cargo test --all-features
@echo "✓ Tests OK"
@echo ""
# Security audit (skips if cargo-audit not installed)
audit:
@echo "🔒 Running security audit..."
@if command -v cargo-audit >/dev/null 2>&1; then \
cargo audit && echo "✓ Security audit OK"; \
else \
echo "⚠ cargo-audit not installed, skipping security audit"; \
echo " Install with: cargo install cargo-audit"; \
fi
@echo ""
# Build debug version
build:
@echo "🔨 Building debug..."
@cargo build
# Build release version
release:
@echo "🚀 Building release..."
@cargo build --release
# Clean build artifacts
clean:
@echo "🧹 Cleaning..."
@cargo clean