Closed bhennesAdv closed 1 year ago
@bhennesAdv The --exclude
parameter only takes sniff names, not error codes. This is documented behaviour, not a bug.
Also see https://github.com/squizlabs/PHP_CodeSniffer/issues/3895#issuecomment-1750235345
Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage
Hello,
Thank you, I had no idea about this difference. Sorry about that.
Describe the bug
The following rule is reported as an error from phpcs but cannot be excluded by the --exclude parameter : PSR2.Methods.FunctionCallSignature.Indent
Code sample
Custom ruleset
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample above.custom-ruleset.xml
with the ruleset sample above.phpcs test.php --standard=custom-ruleset.xml test.php -s
Time: 10ms; Memory: 4MB
Expected behavior
The rule should be ignored and the output clean
Versions (please complete the following information)
Additional context
Please confirm:
master
branch of PHP_CodeSniffer. (Last release tested, not tested from code)