1<?xml version="1.0"?>
2<!-- Source: https://github.com/splitbrain/dokuwiki/blob/release_stable_2020-07-29/_test/phpcs.xml -->
3<ruleset name="DokuWiki Coding Standard Standard" namespace="DokuWiki\CS\Standard">
4    <description>Coding Standard used for DokuWiki</description>
5
6    <!-- default config -->
7    <arg name="colors"/>
8    <arg value="sp"/>
9    <arg name="extensions" value="php"/>
10
11    <ini name="memory_limit" value="-1"/>
12
13    <!-- where to look -->
14    <file>meta/StructTemplateSyntax.php</file>
15    <file>syntax/block.php</file>
16    <file>syntax/inline.php</file>
17
18    <!-- skip these completely -->
19    <exclude-pattern>lang/*/lang.php</exclude-pattern>
20    <exclude-pattern>lang/*/settings.php</exclude-pattern>
21    <exclude-pattern>_vagrant/*</exclude-pattern>
22
23    <!-- rules on top of PSR-12 -->
24    <rule ref="PSR12">
25        <!-- This rule breaks the single line guard pattern that we prefer to keep using -->
26        <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed"/>
27
28        <!-- we have lots of legacy classes without name spaces -->
29        <exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
30    </rule>
31
32    <!-- disable some rules for certain paths, for legacy support -->
33    <rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
34        <exclude-pattern>syntax/block.php</exclude-pattern>
35        <exclude-pattern>syntax/inline.php</exclude-pattern>
36    </rule>
37</ruleset>
38