Add ignoreList for prefixed functions sniff in phpcs.xml
authorVivek Ghaisas <v.a.ghaisas@gmail.com>
Wed, 9 Sep 2015 21:12:15 +0000 (02:42 +0530)
committerVivek Ghaisas <v.a.ghaisas@gmail.com>
Sat, 26 Sep 2015 21:49:46 +0000 (03:19 +0530)
Certain unprefixed global functions have been in the codebase from a
long time and prefixing them could cause errors. The prefixed functions
sniff allows an ignoreList to be set in phpcs.xml.

Bug: T104501
Change-Id: Ie094f78781b2d6f7af1a0f1eea1f7ea4d0b9c69c

phpcs.xml

index 7076f60..9410d89 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -8,6 +8,11 @@
                <exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
                <exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
        </rule>
+       <rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
+               <properties>
+                       <property name="ignoreList" type="array" value="bfNormalizeTitleStrReplace,bfNormalizeTitleStrTr,cdbShowHelp,codepointToUtf8,compare_point,cssfilter,escapeSingleString,findAuxFile,findFiles,getEscapedProfileUrl,getFileCommentFromSourceWiki,getFileUserFromSourceWiki,hexSequenceToUtf8,mccGetHelp,mccShowUsage,mimeTypeMatch,moveToExternal,NothingFunction,NothingFunctionData,resolveStub,resolveStubs,showUsage,splitFilename,utf8ToCodepoint,utf8ToHexSequence" />
+               </properties>
+       </rule>
        <file>.</file>
        <arg name="encoding" value="utf8"/>
        <arg name="extensions" value="php,php5,inc,sample"/>