os/shell/hooks/pre-commit.sh
Benjamin Bädorf 3c3abec238
fix: move pre-commit treefmt hook into CI
The logic inside the hook was rather broken, causing confusing merges,
stashes, and aborts. Unfortunately `treefmt` does not provide a pure
lint option that checks without writing the changes. So instead, we do
this in CI.
2023-07-13 17:05:27 +02:00

10 lines
203 B
Bash
Executable file

#!/usr/bin/env bash
# Check editorconfig
if ! editorconfig-checker; then
printf "%b\n" \
"\nCode is not aligned with .editorconfig" \
"Review the output and commit your fixes" >&2
exit 1
fi