-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
The "phpcs" doesn't use error exit code when invalid standard is given #2412
Comments
@aik099 I've just ran some tests with the below ruleset to try and reproduce this (using Could you provide more information to help reproduce the issue ? <?xml version="1.0" encoding="UTF-8"?>
<ruleset name="issue-2412">
<description>PHP_CodeSniffer</description>
<rule ref="PSR1"/>
<rule ref="Standard.Category.SniffName"/>
</ruleset> Output:
|
Ah, that's my bad. I was using Phing as my build system and haven't indicated a flag to fail the build based on When I did so now I've noticed that |
@aik099 Of course there is ;-) If you always want to ignore warnings/errors for the exit code, you can use If you only want to just ignore them for a particular run, like in CI, you can use |
@jrfnl , thanks. That is exactly, when I need. I've looked at |
Maybe a link to the wiki at the bottom of the output ?
|
Great idea. Thanks. |
@aik099 The PR got rejected. Do you want to re-open ? |
Since it was rejected reopening it with same changes won't do any good. Maybe we can return to originally proposed idea: list configuration options, that are supported (dynamically). |
@aik099 Sorry, that's what I meant: re-opening this issue to see if we can come up with another solution. |
OK. Reopening. |
I was trying to use PHP_CodeSniffer 2.x standard on PHP_CodeSniffer 3.x binary. Since
ruleset.xml
format wasn't changed I wasn't getting any exception due wrongly named sniff classes.I however did get this output:
Unfortunately exit code from that operation was 0 (= success) and therefore any build system using PHP_CodeSniffer wouldn't fail.
The text was updated successfully, but these errors were encountered: