2024-01-02 18:57:33 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Run the formatter and linter before commits
|
2024-03-30 23:31:17 +00:00
|
|
|
# TODO: automatically squash in formatting changes
|
|
|
|
# For now if there formatting changes just undo the
|
|
|
|
# previous commit and commit again.
|
2024-01-02 18:57:33 +00:00
|
|
|
|
|
|
|
# If any command fails exit immediately with that code
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
|
|
# Check source without compiling
|
|
|
|
./scripts/check_all.sh
|
2024-04-08 21:44:49 +00:00
|
|
|
echo "source code checks complete"
|
2024-01-02 18:57:33 +00:00
|
|
|
|
|
|
|
# Run the formatter
|
|
|
|
./scripts/fmtall.sh
|
|
|
|
echo "source code formatting complete"
|