#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")/.." cargo fmt --check cargo test cargo run -- dictionary generate test -s dictionary/actions.jsonl test -s dictionary/actions.index.json test -s dictionary/model.codebook.json test -s dictionary/model.examples.jsonl test -s dictionary/static-base.json python3 - <<'PY' import json from pathlib import Path for path in [ "dictionary/actions.index.json", "dictionary/model.codebook.json", "dictionary/static-base.json", ]: json.loads(Path(path).read_text()) for path in ["dictionary/actions.jsonl", "dictionary/model.examples.jsonl"]: for line_number, line in enumerate(Path(path).read_text().splitlines(), start=1): if line.strip(): json.loads(line) PY echo "precommit check complete"