Bug #19693 [Com]: exclude-patterns no longer work on specific messages
| From: | pear@kennel17.co.uk | Date: | Wed, 07 Nov 2012 03:46:09 +0000 |
| Subject: | Bug #19693 [Com]: exclude-patterns no longer work on specific messages | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9301@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19693&edit=1
ID: 19693
Comment by: pear@kennel17.co.uk
Reported By: pear at kennel17 dot co dot uk
Summary: exclude-patterns no longer work on specific messages
Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: All
Package Version: 1.4.1
PHP Version: Irrelevant
Assigned To: squiz
Roadmap Versions:
New Comment:
OK - thanks for the explanation.
Previous Comments:
------------------------------------------------------------------------
[2012-11-07 03:35:59] squiz
Thanks for getting back to me.
I should have said "standard way" instead of "best way". The severity
setting was
built to exclude messages and sniffs for all files while the exclude
patterns were built
to exclude messages and sniffs for a subset of files.
So if any improvements (perhaps performance improvements) are ever added
in the
future for excluding messages/sniffs from all files, it is better to be
using the method
that was designed for that purpose, although I'll always make sure the
other way is
also supported.
Hope that makes sense.
------------------------------------------------------------------------
[2012-11-07 03:22:18] happydog
<severity>0</severity> works fine, but glad to see you've fixed the
other method too.
Out of interest, why is the <severity> method 'best' - are they not
equivalent?
------------------------------------------------------------------------
[2012-11-07 02:04:17] squiz
-Status: Feedback
+Status: Closed
Fixed in github repo:
https://github.com/squizlabs/PHP_CodeSniffer/commit/0181a097c94ab7b1a5c5a3fdb
2aab60c470fa483
------------------------------------------------------------------------
[2012-11-07 02:02:38] squiz
-Summary: exclude-pattern * no longer works
+Summary: exclude-patterns no longer work on specific messages
------------------------------------------------------------------------
[2012-11-07 01:37:47] squiz
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
Yes, it should exclude all files, so I will look into it. But the best
way of doing this is
actually to use this:
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
<severity>0</severity>
</rule>
That drops the severity down to 0, which tells PHPCS to stop generating
that
message. Give that a go and let me know if it works.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=19693
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19693&edit=1