Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.0RC4

Bug #20322 Display rules set to type=error even when suppressing warnings
Submitted: 2014-06-27 22:07 UTC Modified: 2014-06-30 07:21 UTC
From: mccreaja Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.5.3)
PHP Version: 5.4.24 OS: OS X 10.9.3
Roadmaps: (Not assigned)    
Subscription  


 [2014-06-27 22:07 UTC] mccreaja (Jason McCreary)
Description: ------------ I set a Sniff to of type error when it's default type is a warning see attached annotated ruleset. When I run `phpcs` against this ruleset, it correctly reports the error as expected. However, when I set `-n` to suppress warnings it does not show this error. Test script: --------------- <?xml version="1.0"?> <ruleset name="Via"> <description>The VIA Studio PHP coding standard.</description> <!-- PSR2 base --> <rule ref="PSR2"/> <rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed"> <type>error</type> </rule> </ruleset> Expected result: ---------------- I expected it to still show the error as it is reported as an error. However, it does not when the -n option is passed.

Comments

 [2014-06-30 07:21 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fix committed to Github repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/648c5a290cc707fb37b175df96 ea7ce7264bbba9