#!/bin/sh # script/precommit: run by the git pre-commit hook; fails the commit if # checks fail. Our own extension to scripts-to-rule-them-all. # # Runs lint but deliberately NOT the tests, so the TDD red-phase commit # (failing tests, no implementation yet) can land. CI runs # script/cibuild, whose image build includes the test phase, and so # catches any branch that ships red. The lint phase includes the # prettier check, so a badly formatted tree still fails the commit. set -eu SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" main() { "$SCRIPT_DIR/lint" } main "$@"