mirror of
https://github.com/apple/container.git
synced 2026-10-14 01:59:18 +00:00
Adds opt-in precommit hook to check formatting. (#483)
This commit is contained in:
1 parent
ce0963f693
commit
dadfdcefae
5 files changed
+116
-14
No files matched your search
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#! /bin/bash -e
|
||||
|
||||
setup_error() {
|
||||
echo failed to run: $1 1>&2
|
||||
echo run '"make pre-commit"' and try again 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ ! -z "${PRECOMMIT_NOFMT}" ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo checking formatting and licenses 1>&2
|
||||
project_pathname=$(git rev-parse --show-toplevel)
|
||||
cd "${project_pathname}"
|
||||
make check
|
||||
Reference in new issue
Block a user