-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
phpcbf and phpcs will now check against WP and WC standards
- Loading branch information
1 parent
9e93c9f
commit 531ef92
Showing
4 changed files
with
13 additions
and
20 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
#!/bin/sh | ||
|
||
# phpcbf returns exit-code as 1 even if all errors were fixed. | ||
# https://github.com/squizlabs/PHP_CodeSniffer/issues/3057#issuecomment-919794895 | ||
|
||
composer run phpcbf $@ | ||
|
||
status=$? | ||
|
||
[ $status -eq 1 ] && exit 0 || exit $status |
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
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 |
---|---|---|
|
@@ -3,6 +3,6 @@ module.exports = { | |
'npm run eslint:fix', | ||
], | ||
'*.php': [ | ||
'bin/wc-phpcbf', | ||
'sh bin/wc-phpcbf.sh', | ||
], | ||
}; |