-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modify commit hook to not fail on phpcs warnings
- Loading branch information
itismadness
committed
Nov 4, 2020
1 parent
4717875
commit b297527
Showing
3 changed files
with
202 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This is a wrapper script around calling vendor/bin/phpcs as it will return | ||
# 0 when no errors or warnings are found, 1 for only warnings, and 2 if any errors | ||
# are found. We do not want to fail our CI pipeline on warnings, but still want to | ||
# show them. | ||
# See https://github.com/squizlabs/PHP_CodeSniffer/issues/1818#issuecomment-354420927 | ||
|
||
root=$( dirname $0 )/.. | ||
|
||
$root/vendor/bin/phpcs $@ | ||
exit=$? | ||
|
||
if [[ $exit == 1 ]]; then | ||
exit=0 | ||
fi | ||
|
||
exit $exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.