|
@@ -11,23 +11,23 @@ default:
|
|
|
|
|
|
|
|
|
# run `cargo build` on everything
|
|
|
-build:
|
|
|
+build *ARGS="--workspace --all-targets":
|
|
|
#!/usr/bin/env bash
|
|
|
set -euo pipefail
|
|
|
if [ ! -f Cargo.toml ]; then
|
|
|
cd {{invocation_directory()}}
|
|
|
fi
|
|
|
- cargo build --workspace --all-targets
|
|
|
+ cargo build {{ARGS}}
|
|
|
|
|
|
|
|
|
# run `cargo check` on everything
|
|
|
-check:
|
|
|
+check *ARGS="--workspace --all-targets":
|
|
|
#!/usr/bin/env bash
|
|
|
set -euo pipefail
|
|
|
if [ ! -f Cargo.toml ]; then
|
|
|
cd {{invocation_directory()}}
|
|
|
fi
|
|
|
- cargo check --workspace --all-targets
|
|
|
+ cargo check {{ARGS}}
|
|
|
|
|
|
|
|
|
# run all checks recommended before opening a PR
|
|
@@ -70,22 +70,22 @@ test: build
|
|
|
|
|
|
|
|
|
# run and restart on changes
|
|
|
-watch:
|
|
|
+watch *ARGS="-x run":
|
|
|
#!/usr/bin/env bash
|
|
|
set -euo pipefail
|
|
|
if [ ! -f Cargo.toml ]; then
|
|
|
cd {{invocation_directory()}}
|
|
|
fi
|
|
|
- env RUST_LOG=${RUST_LOG:-debug} cargo watch -x run
|
|
|
+ env RUST_LOG=${RUST_LOG:-debug} cargo watch {{ARGS}}
|
|
|
|
|
|
|
|
|
# run `cargo clippy` on everything
|
|
|
-clippy:
|
|
|
- cargo clippy --locked --offline --workspace --all-targets -- --deny warnings --allow deprecated
|
|
|
+clippy *ARGS="--locked --offline --workspace --all-targets":
|
|
|
+ cargo clippy {{ARGS}} -- --deny warnings --allow deprecated
|
|
|
|
|
|
# run `cargo clippy --fix` on everything
|
|
|
-clippy-fix:
|
|
|
- cargo clippy --locked --offline --workspace --all-targets --fix
|
|
|
+clippy-fix *ARGS="--locked --offline --workspace --all-targets":
|
|
|
+ cargo clippy {{ARGS}} --fix
|
|
|
|
|
|
|
|
|
# run `semgrep`
|