Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Composer): update to latest wpcs release #38

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions bin/hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ fi
# Run PHP_CodeSniffer
echo "Running PHP_CodeSniffer..."

git diff --name-only --cached --diff-filter=ACMRTUXB | xargs vendor/bin/phpcs $standard
if [ $? != 0 ]
then
composer run lint:plugin
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this command coming from? While it's handy to have a Composer script to run, I don't see a definition for this anywhere (nor is WP Enforcer only used for plugins, as this command seems to indicate).

if [ $? != 0 ]; then
echo "Please fix coding standards errors before committing"
exit 1
fi
fi
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"PHP_CodeSniffer"
],
"require": {
"wp-coding-standards/wpcs": "^0.10.0"
"wp-coding-standards/wpcs": "^0.11.0"
},
"bin": [
"bin/wp-enforcer"
Expand Down