08d50f8dcc
- preludes
- slice::{RotateInsertExt, SplitOn}, cstr::{UnixCStrAs, CStrSplit}, str::UnixStrAs
- exhaustive testing and checking
- documentation for everything
37 lines
546 B
Bash
Executable File
37 lines
546 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
ANSIRED="\033[1;31m"
|
|
ANSIRESET="\033[0m"
|
|
errprint() {
|
|
printf "%b%s%b\n" \
|
|
"$ANSIRED" "$*" "$ANSIRESET" >&2
|
|
}
|
|
|
|
[ -f "Cargo.toml" ] || {
|
|
errprint "No Cargo.toml present"
|
|
exit 1
|
|
}
|
|
|
|
(
|
|
set -x
|
|
|
|
cargo check -q
|
|
cargo clippy -q
|
|
cargo test -q
|
|
cargo doc -q
|
|
cargo fmt --check
|
|
codespell
|
|
prettier --check .
|
|
git ls-files -z "*.sh" | xargs -0 shellcheck
|
|
)
|
|
|
|
if [ "${1:-}" == "extra" ]; then (
|
|
set -x
|
|
|
|
cargo +nightly miri test -q
|
|
) fi
|