check-no-em-dash.sh
Language Shell397 B10 lines
#!/usr/bin/env bash# House style: no em dashes anywhere in the repository, lockfiles included.set -euo pipefailcd "$(dirname "$0")/.."dash=$(printf '\xe2\x80\x94') # U+2014, built from its bytes so this file does not contain oneif git ls-files -z | xargs -0 grep -nIF -e "$dash" -- 2>/dev/null; thenecho "Em dashes found (above). Rewrite the sentence." >&2exit 1fiecho "no em dashes"