-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
55 lines (43 loc) · 1.27 KB
/
Copy pathjustfile
File metadata and controls
55 lines (43 loc) · 1.27 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
set shell := ["bash", "-uc"]
default:
@just --list
# One-time per clone: point git at tracked hooks under .githooks/
setup-hooks:
git config core.hooksPath .githooks
@chmod +x .githooks/pre-commit .githooks/commit-msg .githooks/prepare-commit-msg .githooks/pre-push
@echo "hooks active: core.hooksPath=.githooks"
@ls -1 .githooks/
fmt:
cargo fmt --all
check:
cargo check --all-features
clippy:
cargo clippy --all-features -- -D warnings
test:
cargo nextest run --workspace --no-fail-fast
build:
cargo build --release
# Secret / leak scans (gitleaks + ripsecrets). Requires both on PATH.
secrets:
#!/usr/bin/env bash
set -euo pipefail
if command -v gitleaks >/dev/null 2>&1; then
gitleaks detect --source . --config .gitleaks.toml --redact --verbose --exit-code 1
else
echo "error: gitleaks not installed" >&2
exit 1
fi
if command -v ripsecrets >/dev/null 2>&1; then
ripsecrets --strict-ignore .
else
echo "error: ripsecrets not installed" >&2
exit 1
fi
docs:
python3 scripts/update_docs.py
docs-check:
python3 scripts/update_docs.py
git diff --exit-code README.md docs/CLI.md
validate: secrets fmt check clippy test
run *ARGS:
cargo run --bin truss -- {{ARGS}}