Skip to content

Commit

Permalink
Ensure correct exit status on pre-commit (#523)
Browse files Browse the repository at this point in the history
Pre-commit should return the status of the executed phing target, this will prevent code from being committed that doesn't meet the minimum requirements for the project.

These checks can be skipped by specifying the `--no-verify` option when comitting.
  • Loading branch information
steveworley authored and grasmash committed Oct 10, 2016
1 parent 645df6e commit 03fa6ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ if [ ! -f $PHPCS_BIN ];
fi

${ROOT_DIR}/vendor/bin/blt validate:phpcs:files -Dfiles="$LIST" -q
exit 0;

# Return the status of the phing task. Any target executed should throw a build exception to prevent
# code from being committed during the precommit. The hooks can be skipped by adding `--no-verify` to
# a commit.
exit $?

0 comments on commit 03fa6ac

Please sign in to comment.