xref: /dokuwiki/_test/phpcs_MigrationAdjustments.xml (revision b2c8ab476900a0c31b68ef5eed3749ec674892e2)
1<?xml version="1.0"?>
2<ruleset name="Migration Adjustments for the DokuWiki Coding Standard Standard" namespace="DokuWiki\CS\Standard">
3    <description>These are exceptions to the Coding Standard used for DokuWiki that are intended to be removed over time.</description>
4
5    <!-- rules on top of PSR-12 -->
6    <rule ref="./phpcs.xml">
7        <!-- Rules with automatic fixes that we want to adhere to, but currently don't -->
8        <exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine"/>
9        <exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
10        <exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/>
11        <exclude name="Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterDecrement"/>
12        <exclude name="Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement"/>
13
14        <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis"/>
15        <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword"/>
16        <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/>
17        <exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace"/>
18        <exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/>
19        <exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
20        <exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/>
21        <exclude name="Squiz.WhiteSpace.ScopeClosingBrace.Indent"/>
22        <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine"/>
23
24        <exclude name="PSR2.Classes.PropertyDeclaration.StaticBeforeVisibility"/>
25        <exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
26        <exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace"/>
27        <exclude name="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed"/>
28        <exclude name="PSR2.ControlStructures.SwitchDeclaration.BreakIndent"/>
29        <exclude name="PSR2.ControlStructures.SwitchDeclaration.BreakNotNewLine"/>
30        <exclude name="PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineCASE"/>
31        <exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonDEFAULT"/>
32        <exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE"/>
33        <exclude name="PSR2.Methods.FunctionCallSignature.Indent"/>
34        <exclude name="PSR2.Methods.FunctionCallSignature.EmptyLine"/>
35        <exclude name="PSR2.Methods.FunctionCallSignature.ContentAfterOpenBracket"/>
36        <exclude name="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket"/>
37        <exclude name="PSR2.Methods.FunctionCallSignature.CloseBracketLine"/>
38        <exclude name="PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket"/>
39        <exclude name="PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket"/>
40        <exclude name="PSR2.Methods.FunctionCallSignature.MultipleArguments"/>
41        <exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/>
42        <exclude name="PSR2.Methods.MethodDeclaration.StaticBeforeVisibility"/>
43        <exclude name="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/>
44        <exclude name="PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse"/>
45
46        <exclude name="PSR12.Classes.OpeningBraceSpace.Found"/>
47        <exclude name="PSR12.ControlStructures.BooleanOperatorPlacement.FoundMixed"/>
48        <exclude name="PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine"/>
49        <exclude name="PSR12.ControlStructures.ControlStructureSpacing.CloseParenthesisLine"/>
50        <exclude name="PSR12.ControlStructures.ControlStructureSpacing.LineIndent"/>
51        <exclude name="PSR12.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
52        <exclude name="PSR12.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace"/>
53        <exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>
54        <exclude name="PSR12.Operators.OperatorSpacing.NoSpaceBefore"/>
55        <exclude name="PSR12.Operators.OperatorSpacing.NoSpaceAfter"/>
56    </rule>
57
58    <!-- for now we mix declarations and execution here (mostly for defines) -->
59    <rule ref="PSR1.Files.SideEffects">
60        <exclude-pattern>*/index.php</exclude-pattern>
61        <exclude-pattern>*/inc/parserutils.php</exclude-pattern>
62        <exclude-pattern>*/inc/mail.php</exclude-pattern>
63        <exclude-pattern>*/inc/init.php</exclude-pattern>
64        <exclude-pattern>*/inc/farm.php</exclude-pattern>
65        <exclude-pattern>*/inc/fulltext.php</exclude-pattern>
66        <exclude-pattern>*/inc/pluginutils.php</exclude-pattern>
67        <exclude-pattern>*/inc/indexer.php</exclude-pattern>
68        <exclude-pattern>*/inc/Mailer.class.php</exclude-pattern>
69        <exclude-pattern>*/doku.php</exclude-pattern>
70        <exclude-pattern>*/install.php</exclude-pattern>
71        <exclude-pattern>*/inc/utf8.php</exclude-pattern>
72        <exclude-pattern>*/feed.php</exclude-pattern>
73        <exclude-pattern>*/inc/load.php</exclude-pattern>
74        <exclude-pattern>*/bin/*.php</exclude-pattern>
75        <exclude-pattern>*/lib/exe/*.php</exclude-pattern>
76    </rule>
77
78</ruleset>
79