1<?xml version="1.0"?>
2<ruleset name="DokuWiki Coding Standard Standard" namespace="DokuWiki\CS\Standard">
3    <description>Coding Standard used for DokuWiki</description>
4
5    <!-- default config -->
6    <arg name="colors"/>
7    <arg value="sp"/>
8    <arg name="extensions" value="php"/>
9
10    <!-- where to look -->
11    <file>.</file>
12
13    <!-- skip these completely -->
14    <exclude-pattern>*/lang/*/lang.php</exclude-pattern>
15    <exclude-pattern>*/lang/*/settings.php</exclude-pattern>
16    <exclude-pattern>*/_test/*</exclude-pattern>
17    <exclude-pattern>*/vendor/*</exclude-pattern>
18    <exclude-pattern>*/tmp/*</exclude-pattern>
19
20    <!-- rules on top of PSR-2 -->
21    <rule ref="PSR2">
22        <!-- the following rule is not in PSR-2 and breaks the guardian pattern -->
23        <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed"/>
24
25        <!-- we have lots of legacy classes without name spaces -->
26        <exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
27    </rule>
28
29    <!-- disable some rules for certain paths, for legacy support -->
30    <rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
31        <exclude-pattern>action.php</exclude-pattern>
32        <exclude-pattern>action/*.php</exclude-pattern>
33        <exclude-pattern>syntax.php</exclude-pattern>
34        <exclude-pattern>syntax/*.php</exclude-pattern>
35        <exclude-pattern>helper.php</exclude-pattern>
36        <exclude-pattern>helper/*.php</exclude-pattern>
37        <exclude-pattern>renderer.php</exclude-pattern>
38        <exclude-pattern>renderer/*.php</exclude-pattern>
39        <exclude-pattern>admin.php</exclude-pattern>
40        <exclude-pattern>admin/*.php</exclude-pattern>
41        <exclude-pattern>remote.php</exclude-pattern>
42        <exclude-pattern>remote/*.php</exclude-pattern>
43        <exclude-pattern>auth.php</exclude-pattern>
44        <exclude-pattern>auth/*.php</exclude-pattern>
45        <exclude-pattern>cli.php</exclude-pattern>
46        <exclude-pattern>cli/*.php</exclude-pattern>
47    </rule>
48
49</ruleset>
50