-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjustfile
More file actions
27 lines (22 loc) · 965 Bytes
/
justfile
File metadata and controls
27 lines (22 loc) · 965 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
clippy_flags := '-W clippy::all -W clippy::cargo -W clippy::pedantic -W clippy::nursery -A clippy::multiple-crate-versions -D warnings'
lint crate='':
cargo clippy --workspace --all-targets --all-features --fix --allow-dirty {{ if crate != "" { "-p " + crate } else { "" } }} -- \
{{ clippy_flags }}
test crate='' path='':
cargo nextest run --workspace --all-targets --all-features \
{{ if crate != "" { "-p " + crate } else { "" } }} \
{{ if path != "" { "--test " + path } else { "" } }}
fmt:
cargo fmt --all
examples:
for f in borsa/examples/[0-9][0-9]_*.rs; do \
name=$(basename "$f" .rs); \
echo "==> Running example: $name (live)"; \
cargo run -p borsa --example "$name" || exit 1; \
done
examples-mock:
for f in borsa/examples/[0-9][0-9]_*.rs; do \
name=$(basename "$f" .rs); \
echo "==> Running example: $name (mock)"; \
BORSA_EXAMPLES_USE_MOCK=1 cargo run -p borsa --example "$name" || exit 1; \
done