xref: /dokuwiki/_test/phpcs.xml (revision 99c1e5dfccb8bb708456a37d23f09fcb9a67bdfb)
1994e9d4eSAndreas Gohr<?xml version="1.0"?>
2994e9d4eSAndreas Gohr<ruleset name="DokuWiki Coding Standard Standard" namespace="DokuWiki\CS\Standard">
3994e9d4eSAndreas Gohr    <description>Coding Standard used for DokuWiki</description>
4*99c1e5dfSAndreas Gohr
5*99c1e5dfSAndreas Gohr    <!-- default config -->
6*99c1e5dfSAndreas Gohr    <arg name="colors"/>
7*99c1e5dfSAndreas Gohr    <arg value="sp"/>
8*99c1e5dfSAndreas Gohr    <arg name="extensions" value="php"/>
9*99c1e5dfSAndreas Gohr
10*99c1e5dfSAndreas Gohr    <!-- where to look -->
11994e9d4eSAndreas Gohr    <file>../inc</file>
12994e9d4eSAndreas Gohr    <file>../lib</file>
13994e9d4eSAndreas Gohr    <file>../bin</file>
14994e9d4eSAndreas Gohr    <file>../doku.php</file>
15994e9d4eSAndreas Gohr    <file>../index.php</file>
16994e9d4eSAndreas Gohr    <file>../feed.php</file>
17994e9d4eSAndreas Gohr    <file>../install.php</file>
18*99c1e5dfSAndreas Gohr
19*99c1e5dfSAndreas Gohr    <!-- skip these completely -->
20994e9d4eSAndreas Gohr    <exclude-pattern>*/lang/*/lang.php</exclude-pattern>
21994e9d4eSAndreas Gohr    <exclude-pattern>*/lang/*/settings.php</exclude-pattern>
22994e9d4eSAndreas Gohr    <exclude-pattern>*/_test/*</exclude-pattern>
23*99c1e5dfSAndreas Gohr
24*99c1e5dfSAndreas Gohr    <!-- 3rd party libs, these should be moved to composer some day -->
25*99c1e5dfSAndreas Gohr    <exclude-pattern>*/inc/DifferenceEngine.php</exclude-pattern>
26*99c1e5dfSAndreas Gohr    <exclude-pattern>*/inc/IXR_Library.php</exclude-pattern>
27*99c1e5dfSAndreas Gohr    <exclude-pattern>*/inc/JSON.php</exclude-pattern>
28*99c1e5dfSAndreas Gohr    <exclude-pattern>*/inc/JpegMeta.php</exclude-pattern>
29*99c1e5dfSAndreas Gohr
30994e9d4eSAndreas Gohr    <!-- rules on top of PSR-2 -->
31994e9d4eSAndreas Gohr    <rule ref="PSR2">
32994e9d4eSAndreas Gohr        <!-- the following rule is not in PSR-2 and breaks the guardian pattern -->
33994e9d4eSAndreas Gohr        <exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed"/>
344b3d1701SAndreas Gohr
354b3d1701SAndreas Gohr        <!-- we have lots of legacy classes without name spaces -->
364b3d1701SAndreas Gohr        <exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
37994e9d4eSAndreas Gohr    </rule>
38*99c1e5dfSAndreas Gohr
39*99c1e5dfSAndreas Gohr    <!-- disable some rules for certain paths, for legacy support -->
40*99c1e5dfSAndreas Gohr    <rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
41*99c1e5dfSAndreas Gohr        <exclude-pattern>*/inc/parser/*</exclude-pattern>
42*99c1e5dfSAndreas Gohr
43*99c1e5dfSAndreas Gohr        <exclude-pattern>*/inc/Plugin.php</exclude-pattern>
44*99c1e5dfSAndreas Gohr        <exclude-pattern>*/inc/PluginInterface.php</exclude-pattern>
45*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/action.php</exclude-pattern>
46*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/admin.php</exclude-pattern>
47*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/auth.php</exclude-pattern>
48*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/cli.php</exclude-pattern>
49*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/remote.php</exclude-pattern>
50*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/syntax.php</exclude-pattern>
51*99c1e5dfSAndreas Gohr    </rule>
52*99c1e5dfSAndreas Gohr    <rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
53*99c1e5dfSAndreas Gohr        <exclude-pattern>*/inc/parser/*</exclude-pattern>
54*99c1e5dfSAndreas Gohr
55*99c1e5dfSAndreas Gohr        <exclude-pattern>*/inc/Plugin.php</exclude-pattern>
56*99c1e5dfSAndreas Gohr        <exclude-pattern>*/inc/PluginInterface.php</exclude-pattern>
57*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/action.php</exclude-pattern>
58*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/admin.php</exclude-pattern>
59*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/auth.php</exclude-pattern>
60*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/cli.php</exclude-pattern>
61*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/remote.php</exclude-pattern>
62*99c1e5dfSAndreas Gohr        <exclude-pattern>*/lib/plugins/*/syntax.php</exclude-pattern>
63*99c1e5dfSAndreas Gohr    </rule>
64*99c1e5dfSAndreas Gohr
65994e9d4eSAndreas Gohr</ruleset>
66