QOwnNotes/scripts/pre-commit.sh
Patrizio Bekerle 6eb2381650 git: change error message
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
2025-03-22 13:28:19 +01:00

10 lines
313 B
Bash
Executable file

#!/usr/bin/env bash
# pre-commit hook script
echo "Running pre-commit hook with treefmt"
# Run treefmt to format the code and check if there are any changes after formatting
if ! just fmt --fail-on-change; then
echo -e "\nCode may have been formatted. Please review the changes and commit again."
exit 1
fi