element-x-ios/.githooks/pre-commit

12 lines
303 B
Bash
Executable File

#!/bin/bash
export PATH="$PATH:/opt/homebrew/bin"
if ! swiftformat --lint . > /dev/null 2>&1
then
echo "pre-commit: Commit aborted due to SwiftFormat warnings. Please check the automatically generated fixes and try again"
swiftformat . > /dev/null 2>&1
exit 1
fi
./Tools/Scripts/validate_lfs.sh