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
18    <!-- rules on top of PSR-2 -->
19    <rule ref="PSR2">
20        <!-- the following rule is not in PSR-2 and breaks the guardian pattern -->
21        <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed"/>
22
23        <!-- we have lots of legacy classes without name spaces -->
24        <exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
25    </rule>
26
27    <!-- disable some rules for certain paths, for legacy support -->
28    <rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
29        <exclude-pattern>action.php</exclude-pattern>
30        <exclude-pattern>action/*.php</exclude-pattern>
31        <exclude-pattern>syntax.php</exclude-pattern>
32        <exclude-pattern>syntax/*.php</exclude-pattern>
33        <exclude-pattern>helper.php</exclude-pattern>
34        <exclude-pattern>helper/*.php</exclude-pattern>
35        <exclude-pattern>renderer.php</exclude-pattern>
36        <exclude-pattern>renderer/*.php</exclude-pattern>
37        <exclude-pattern>admin.php</exclude-pattern>
38        <exclude-pattern>admin/*.php</exclude-pattern>
39        <exclude-pattern>remote.php</exclude-pattern>
40        <exclude-pattern>remote/*.php</exclude-pattern>
41        <exclude-pattern>auth.php</exclude-pattern>
42        <exclude-pattern>auth/*.php</exclude-pattern>
43        <exclude-pattern>cli.php</exclude-pattern>
44        <exclude-pattern>cli/*.php</exclude-pattern>
45    </rule>
46
47</ruleset>
48