GitInfo: Don't try shelling out if it's disabled
[lhc/web/wiklou.git] / .phpcs.xml
index 14bb494..e15eca0 100644 (file)
@@ -7,7 +7,9 @@
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
                <exclude name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
+               <exclude name="MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam" />
                <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
+               <exclude name="MediaWiki.Commenting.PhpunitAnnotations.NotClassTrait" />
                <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart" />
                <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentEnd" />
                <exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
@@ -61,7 +63,7 @@
        </rule>
        <rule ref="MediaWiki.NamingConventions.ValidGlobalName">
                <properties>
-                       <property name="ignoreList" type="array" value="$IP,$messageMemc,$parserMemc" />
+                       <property name="ignoreList" type="array" value="$IP,$messageMemc" />
                </properties>
        </rule>
        <rule ref="Generic.Files.LineLength">
@@ -82,6 +84,7 @@
                <exclude-pattern>*/includes/specials/SpecialMostinterwikis\.php</exclude-pattern>
                <exclude-pattern>*/includes/cache/CacheDependency\.php</exclude-pattern>
                <exclude-pattern>*/includes/cache/CacheHelper\.php</exclude-pattern>
+               <exclude-pattern>*/includes/compat/XMPReader\.php</exclude-pattern>
                <exclude-pattern>*/includes/diff/DairikiDiff\.php</exclude-pattern>
                <exclude-pattern>*/includes/specials/SpecialAncientpages\.php</exclude-pattern>
                <exclude-pattern>*/includes/specials/SpecialBrokenRedirects\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/language/date-formats\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/language/languages.inc</exclude-pattern>
                <exclude-pattern>*/maintenance/minify\.php</exclude-pattern>
+               <exclude-pattern>*/maintenance/mysql\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/parse\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/preprocessorFuzzTest\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/rebuildImages\.php</exclude-pattern>
                <exclude-pattern>*/includes/AuthPlugin\.php</exclude-pattern>
                <exclude-pattern>*/includes/cache/CacheDependency\.php</exclude-pattern>
                <exclude-pattern>*/includes/cache/CacheHelper\.php</exclude-pattern>
+               <exclude-pattern>*/includes/compat/XMPReader\.php</exclude-pattern>
                <exclude-pattern>*/includes/deferred/CdnCacheUpdate\.php</exclude-pattern>
                <exclude-pattern>*/includes/diff/DairikiDiff\.php</exclude-pattern>
                <exclude-pattern>*/includes/diff/DiffEngine\.php</exclude-pattern>
        <rule ref="MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn">
                <exclude-pattern>*/tests/phpunit/*\.php</exclude-pattern>
        </rule>
+       <rule ref="MediaWiki.Usage.ForbiddenFunctions.escapeshellarg">
+               <!--
+                       Whitelist existing violations, but enable the sniff to prevent
+                       any new occurrences.
+               -->
+               <exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
+               <exclude-pattern>*/includes/shell/Command\.php</exclude-pattern>
+               <exclude-pattern>*/includes/shell/Shell\.php</exclude-pattern>
+               <exclude-pattern>*/tests/phpunit/structure/StructureTest\.php</exclude-pattern>
+       </rule>
+       <rule ref="MediaWiki.Usage.ForbiddenFunctions.exec">
+               <!--
+                       Whitelist existing violations, but enable the sniff to prevent
+                       any new occurrences.
+               -->
+               <exclude-pattern>*/tests/phpunit/structure/StructureTest\.php</exclude-pattern>
+       </rule>
+       <rule ref="MediaWiki.Usage.ForbiddenFunctions.popen">
+               <!--
+                       Whitelist existing violations, but enable the sniff to prevent
+                       any new occurrences.
+               -->
+               <exclude-pattern>*/includes/GlobalFunctions\.php</exclude-pattern>
+               <exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
+               <exclude-pattern>*/maintenance/7zip\.inc</exclude-pattern>
+               <exclude-pattern>*/maintenance/populateImageSha1\.php</exclude-pattern>
+       </rule>
+       <rule ref="MediaWiki.Usage.ForbiddenFunctions.proc_open">
+               <!--
+                       Whitelist existing violations, but enable the sniff to prevent
+                       any new occurrences.
+               -->
+               <exclude-pattern>includes/export/DumpPipeOutput\.php</exclude-pattern>
+               <exclude-pattern>includes/resourceloader/ResourceLoaderImage\.php</exclude-pattern>
+               <exclude-pattern>includes/shell/Command\.php</exclude-pattern>
+               <exclude-pattern>includes/tidy/RaggettExternal\.php</exclude-pattern>
+               <exclude-pattern>maintenance/dumpTextPass\.php</exclude-pattern>
+               <exclude-pattern>maintenance/mysql\.php</exclude-pattern>
+               <exclude-pattern>maintenance/storage/recompressTracked\.php</exclude-pattern>
+               <exclude-pattern>tests/parser/editTests\.php</exclude-pattern>
+       </rule>
+       <rule ref="MediaWiki.Usage.ForbiddenFunctions.shell_exec">
+               <!--
+                       Whitelist existing violations, but enable the sniff to prevent
+                       any new occurrences.
+               -->
+               <exclude-pattern>*/maintenance/mwdocgen\.php</exclude-pattern>
+               <exclude-pattern>*/maintenance/updateCredits\.php</exclude-pattern>
+       </rule>
+       <rule ref="MediaWiki.Usage.ForbiddenFunctions.system">
+               <!--
+                       Whitelist existing violations, but enable the sniff to prevent
+                       any new occurrences.
+               -->
+               <exclude-pattern>*/maintenance/mwdocgen\.php</exclude-pattern>
+       </rule>
        <file>.</file>
        <arg name="encoding" value="UTF-8"/>
        <arg name="extensions" value="php,php5,inc,sample"/>