Skip to content

Commit

Permalink
Add lint:php:fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed May 21, 2019
1 parent 898b2bc commit 67ec852
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"lint:js": "wp-scripts lint-js .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:php": "vendor/bin/phpcs",
"lint:php:fix": "vendor/bin/phpcbf",

This comment has been minimized.

Copy link
@westonruter

westonruter May 21, 2019

Member

I think this needs a bit more to it, re: #2111 (comment)

This comment has been minimized.

Copy link
@westonruter

westonruter May 21, 2019

Member

See squizlabs/PHP_CodeSniffer#1818 (comment)

So we should return a 0 exit code when phpcbf returns 0 or 1 but not when it returns 2 or 3.

This comment has been minimized.

Copy link
@swissspidy

swissspidy May 21, 2019

Author Collaborator

Oh, totally forgot about this issue. Let me see if I find a quick fix, otherwise I'll revert

"lint:pkg-json": "wp-scripts lint-pkg-json . --ignorePath .gitignore",
"start": "wp-scripts start",
"test": "npm-run-all --parallel test:*",
Expand Down

0 comments on commit 67ec852

Please # to comment.