forked from JeroenDeDauw/Wikibase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
73 lines (64 loc) · 2.71 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0"?>
<ruleset name="Wikibase">
<!-- See https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/master/MediaWiki/ruleset.xml -->
<rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<rule ref="Generic.Classes.DuplicateClassName.Found">
<exclude-pattern>DataAccess.Scribunto.Scribunto_LuaWikibaseLibraryTestCase\.php</exclude-pattern>
</rule>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement">
<exclude-pattern>WikibaseClient\.example\.php</exclude-pattern>
</rule>
<rule ref="Generic.ControlStructures" />
<rule ref="Generic.Files.InlineHTML" />
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="140" />
<property name="absoluteLineLimit" value="9999" />
</properties>
<!-- Exclude auto-generated files from the Translate extension, see magic-export.php. -->
<exclude-pattern>\.i18n\.magic\.php</exclude-pattern>
</rule>
<rule ref="Generic.Files.OneInterfacePerFile" />
<rule ref="Generic.Files.OneTraitPerFile" />
<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag" />
<rule ref="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment">
<severity>0</severity>
</rule>
<rule ref="PSR1" />
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>DataAccess.Scribunto.Scribunto_LuaWikibaseLibraryTestCase\.php</exclude-pattern>
</rule>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<severity>0</severity>
</rule>
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<!-- Exclude test methods like "testGivenInvalidInput_methodThrowsException". -->
<exclude-pattern>tests.phpunit*Test*\.php</exclude-pattern>
</rule>
<rule ref="PSR2.Files" />
<rule ref="Squiz.Classes.DuplicateProperty" />
<rule ref="Squiz.Classes.SelfMemberReference" />
<!-- This sniff is included in PSR1 but needs an exception. -->
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>DataAccess.Scribunto.Scribunto_LuaWikibase*Library</exclude-pattern>
</rule>
<rule ref="Squiz.ControlStructures.ControlSignature" />
<rule ref="Squiz.Functions.FunctionDuplicateArgument" />
<rule ref="Squiz.Functions.GlobalFunction" />
<rule ref="Squiz.Scope" />
<rule ref="Squiz.Scope.MethodScope">
<!-- FIXME: This indicates an error in the QueryPage base class that should be fixed. -->
<exclude-pattern>SpecialUnconnectedPages\.php</exclude-pattern>
</rule>
<rule ref="Squiz.WhiteSpace.CastSpacing" />
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true" />
</properties>
</rule>
</ruleset>