Skip to content

Commit

Permalink
Updated git pre-commit hook to use code:check command.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kate committed Aug 22, 2018
1 parent 13f4857 commit 86aaf16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions .git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@ then
exit 0
fi

# Run PHP checks (all codebase).
make --quiet phpcs
PHPCS_RESULT=$?
# Run code standards checks.
make --quiet code:check
CHECKS_RESULT=$?

# Run JS checks (all codebase).
make --quiet eslint
ESLINT_RESULT=$?

if [ $PHPCS_RESULT -ne 0 ] || [ $ESLINT_RESULT -ne 0 ]
if [ $CHECKS_RESULT -ne 0 ]
then

echo "${white}${bg_red}"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ prepare: | up
$(call docker-wodby, php chmod 666 web/sites/default/settings.php)
# Prepare git hooks.
$(call message,$(PROJECT_NAME): Setting up git hooks)
ln -s $(shell pwd)/.git-hooks/* $(shell pwd)/.git/hooks/
ln -s $(shell pwd)/.git-hooks/* $(shell pwd)/.git/hooks


install: | prepare
Expand Down

0 comments on commit 86aaf16

Please sign in to comment.