forked from wikimedia/oojs-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.phpcs.xml
29 lines (29 loc) · 1.56 KB
/
.phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0"?>
<ruleset name="OOUI">
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<!-- Disabled because it complains about "missing" documentation where it is inherited -->
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<!-- Together with the above, false positives in WikimediaUITheme.php and others -->
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.PropertyDocumentation.WrongStyle" />
<exclude name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.allowedPrefix" />
<exclude name="PSR2.Classes.PropertyDeclaration.Multiple" />
</rule>
<!-- Allow superglobals in entry points -->
<rule ref="MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals">
<exclude-pattern>*/demos/demos.php</exclude-pattern>
<exclude-pattern>*/demos/widgets.php</exclude-pattern>
</rule>
<!-- Allow global functions in tests -->
<rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix">
<exclude-pattern>*/tests/*.php</exclude-pattern>
</rule>
<file>.</file>
<arg name="encoding" value="UTF-8"/>
<arg name="extensions" value="php"/>
<exclude-pattern type="relative">^build/*</exclude-pattern>
<exclude-pattern type="relative">^demos/(php|vendor)/*</exclude-pattern>
</ruleset>