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

Request #14002 Add mechanism to suppress error/warning due to failed sniff
Submitted: 2008-05-28 05:40 UTC
From: bender Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 45 - 3 = ?

 
 [2008-05-28 05:40 UTC] bender (Bryan Davis)
Description: ------------ Sometimes rules are meant to be broken. This patch allows an error or warning to be suppressed by adding a specially formatted comment to the line proceeding the offending code. A comment of the form "//@SUPPRESS" triggers the suppression. If the verbosity of CodeSniffer is greater than 0 (default), a message will be output to stdout announcing the error or warning that has been suppressed.

Comments

 [2008-05-29 10:01 UTC] squiz (Greg Sherwood)
Duplicate of Request #14000, which contains the same patch.
 [2008-05-29 15:24 UTC] bender (Bryan Davis)
Both Request #14000 and Request #14002 have been closed as dups of each other. Request #14000 somehow messed up the submitter authentication and is not visible to normal bugs browsers. This ticket however is visible, so it should probably be the one to remain open until the patch is applied or rejected.
 [2008-05-29 22:18 UTC] squiz (Greg Sherwood)
Thanks. I didn't notice it didn't appear in the bug list.
 [2009-07-03 12:19 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I've added this feature but used different tags so they match the ones in PHPUnit. I've also decided not to print any messages about suppressing errors and warnings, but they may be added later if it becomes useful for people to know. Use the tags like this: // @codingStandardsIgnoreStart echo "no errors here"; // @codingStandardsIgnoreEnd