summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rwxr-xr-xcheck39
1 files changed, 9 insertions, 30 deletions
diff --git a/check b/check
index 753de3d..f9d68e1 100755
--- a/check
+++ b/check
@@ -24,40 +24,19 @@ then
hideok=
fi
-
-codegen() {
- $hideok sp-codegen "$1" --output "$2" --run
-}
-
-docgen() {
- $hideok sp-docgen "$1" --output "$2"
-}
-
+$hideok cargo check --all-targets
+$hideok cargo clippy
$hideok cargo build --all-targets
-if cargo --list | awk '{ print $1 }' | grep 'clippy$' > /dev/null
-then
- $hideok cargo clippy
-fi
$hideok cargo test
-if command -v rustfmt > /dev/null
-then
- find src -type f -name '*.rs' -exec rustfmt --check '{}' +
-fi
+$hideok cargo fmt -- --check
+$hideok find . -type f -name '*.py' ! -name test.py -exec black --check '{}' +
-if command -v black > /dev/null
-then
- $hideok find . -type f -name '*.py' ! -name template.py ! -name test.py \
- -exec black --check '{}' +
-fi
+$hideok sp-docgen jt.md --output jt.html
+$hideok sp-docgen jt.md --output jt.pdf
-for md in [^CR]*.md
-do
- $hideok echo "$md ====================================="
- codegen "$md" test.py
- docgen "$md" "$(basename "$md" .md).pdf"
- docgen "$md" "$(basename "$md" .md).html"
- $hideok echo
-done
+$hideok sp-codegen jt.md --output test.py
+rm -f test.log
+$hideok python3 test.py --log test.log "$@"
echo "Everything seems to be in order."