22 lines
568 B
Bash
Executable File
22 lines
568 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Full local CI gate. Fails fast on the first broken rule.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo '==> cargo fmt --check'
|
|
cargo fmt --all -- --check
|
|
|
|
echo '==> clippy (deny warnings)'
|
|
cargo clippy --workspace --all-targets -- -D warnings
|
|
|
|
echo '==> float guard in crates/sim/src'
|
|
if grep -rnE '(^|[^A-Za-z0-9_])f(32|64)([^A-Za-z0-9_]|$)' crates/sim/src --include='*.rs' | grep -v '^.*://' ; then
|
|
echo 'ERROR: floating point types in crates/sim (see ADR 0002)' >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo '==> cargo test'
|
|
cargo test --workspace
|
|
|
|
echo '==> OK'
|