dymokomi/luce-js
Source of release 0.6.1
0.6.1 / tools / check_format.sh
#!/bin/sh
# Lint, not a test: every module is laid out as the formatter lays it out (tests/repl.lucb is
# ljsc's output, compared as generated by tests/ljs_tools). `luc test` runs the tests.
set -e
cd "$(dirname "$0")/.."
for file in $(git ls-files '*.lucb' | grep -v '^tests/repl.lucb$'); do
luce-base fmt "$file" --check > /dev/null || { echo "$file is not formatted (luce-base fmt $file --write)"; exit 1; }
done
for file in $(git ls-files '*.luc'); do
luce fmt "$file" --check > /dev/null || { echo "$file is not formatted (luce fmt $file --write)"; exit 1; }
done
echo "formatted"