svn: /pear/peardoc/trunk/en/package/php/php-codesniffer/ annotated-ruleset.xml
[email protected] (Greg Sherwood) Tue, 12 Oct 2010 05:16:09 +0000
| Newsgroups | php.pear.doc |
|---|---|
| Message-ID | <[email protected]> |
squiz Tue, 12 Oct 2010 05:16:09 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=304342
Log:
Updated docs for new rule-based exclude patterns
Changed paths:
U pear/peardoc/trunk/en/package/php/php-codesniffer/annotated-ruleset.xml
Modified: pear/peardoc/trunk/en/package/php/php-codesniffer/annotated-ruleset.xml
===================================================================
--- pear/peardoc/trunk/en/package/php/php-codesniffer/annotated-ruleset.xml 2010-10-12 05:16:01 UTC (rev 304341)
+++ pear/peardoc/trunk/en/package/php/php-codesniffer/annotated-ruleset.xml 2010-10-12 05:16:09 UTC (rev 304342)
@@ -190,7 +190,7 @@
when it is unable to detect code in a file, possible due to
the use of short open tags even though php.ini disables them.
You can disable this message in the same way as sniff messages.
-
+
Again, the code here will be displayed in the PHP_CodeSniffer
output when using the -s command line argument while checking a file.
-->
@@ -198,6 +198,30 @@
<severity>0</severity>
</rule>
+ <!--
+ You can also hard-code ignore patterns for specific sniffs,
+ a feature not available on the command line.
+
+ The code here will hide all messages from the Squiz DoubleQuoteUsageSniff
+ for files that match either of the two exclude patterns.
+ -->
+ <rule ref="Squiz.Strings.DoubleQuoteUsage">
+ <exclude-pattern>*/tests/*</exclude-pattern>
+ <exclude-pattern>*/data/*</exclude-pattern>
+ </rule>
+
+ <!--
+ You can also be more specific and just exclude some messages.
+
+ The code here will just hide the ContainsVar error generated by the
+ Squiz FileCommentSniff for files that match either of the two
+ exclude patterns.
+ -->
+ <rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
+ <exclude-pattern>*/tests/*</exclude-pattern>
+ <exclude-pattern>*/data/*</exclude-pattern>
+ </rule>
+
</ruleset>
]]>
</programlisting>