diff --git a/scripts/pre-commit-hook.sh b/scripts/pre-commit-hook.sh index 3957377d..bffab339 100644 --- a/scripts/pre-commit-hook.sh +++ b/scripts/pre-commit-hook.sh @@ -14,7 +14,7 @@ fi cd .. # For reference: https://github.com/clibs/clib/blob/master/scripts/pre-commit-hook.sh#L3-L10 -function format_and_restage_file { +format_and_restage_file () { local file="$1" if [ -f "$file" ]; then java -jar .cache/google-java-format-1.7-all-deps.jar --replace $file @@ -25,4 +25,4 @@ function format_and_restage_file { # Format each staged file ending in .java for file in `git diff-index --cached --name-only HEAD | grep -iE '.*java$' ` ; do format_and_restage_file "$file" -done \ No newline at end of file +done