-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJustfile
More file actions
27 lines (22 loc) · 680 Bytes
/
Justfile
File metadata and controls
27 lines (22 loc) · 680 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
# If you change anything in here, make sure to also adjust the lint CI job!
lint:
cargo +nightly fmt --all -- --check
taplo format --check
cargo clippy --tests --workspace -- -D warnings
format:
just ensure-command taplo
cargo +nightly fmt
taplo format
test:
cargo test
# Ensures that one or more required commands are installed
ensure-command +command:
#!/usr/bin/env bash
set -euo pipefail
read -r -a commands <<< "{{ command }}"
for cmd in "${commands[@]}"; do
if ! command -v "$cmd" > /dev/null 2>&1 ; then
printf "Couldn't find required executable '%s'\n" "$cmd" >&2
exit 1
fi
done