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.PHP.LowerCaseKeyword.Found"/> 10 <exclude name="Generic.PHP.LowerCaseConstant.Found"/> 11 <exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/> 12 <exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect"/> 13 <exclude name="Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterDecrement"/> 14 <exclude name="Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement"/> 15 16 <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis"/> 17 <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword"/> 18 <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/> 19 <exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace"/> 20 <exclude name="Squiz.ControlStructures.ForEachLoopDeclaration.NoSpaceBeforeArrow"/> 21 <exclude name="Squiz.ControlStructures.ForEachLoopDeclaration.NoSpaceAfterArrow"/> 22 <exclude name="Squiz.ControlStructures.ForEachLoopDeclaration.SpacingBeforeAs"/> 23 <exclude name="Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterSecond"/> 24 <exclude name="Squiz.ControlStructures.ForLoopDeclaration.NoSpaceAfterSecond"/> 25 <exclude name="Squiz.ControlStructures.ForLoopDeclaration.NoSpaceAfterFirst"/> 26 <exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.NoSpaceBeforeArg"/> 27 <exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterEquals"/> 28 <exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterReference"/> 29 <exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose"/> 30 <exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals"/> 31 <exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/> 32 <exclude name="Squiz.Functions.MultiLineFunctionDeclaration.NewlineBeforeOpenBrace"/> 33 <exclude name="Squiz.Functions.MultiLineFunctionDeclaration.CloseBracketLine"/> 34 <exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/> 35 <exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/> 36 <exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/> 37 <exclude name="Squiz.WhiteSpace.ScopeClosingBrace.Indent"/> 38 <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine"/> 39 40 <exclude name="PSR2.Classes.PropertyDeclaration.StaticBeforeVisibility"/> 41 <exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/> 42 <exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace"/> 43 <exclude name="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed"/> 44 <exclude name="PSR2.ControlStructures.SwitchDeclaration.BreakIndent"/> 45 <exclude name="PSR2.ControlStructures.SwitchDeclaration.BreakNotNewLine"/> 46 <exclude name="PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineCASE"/> 47 <exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonDEFAULT"/> 48 <exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE"/> 49 <exclude name="PSR2.Files.EndFileNewline.TooMany"/> 50 <exclude name="PSR2.Files.EndFileNewline.NoneFound"/> 51 <exclude name="PSR2.Methods.FunctionCallSignature.Indent"/> 52 <exclude name="PSR2.Methods.FunctionCallSignature.EmptyLine"/> 53 <exclude name="PSR2.Methods.FunctionCallSignature.ContentAfterOpenBracket"/> 54 <exclude name="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket"/> 55 <exclude name="PSR2.Methods.FunctionCallSignature.CloseBracketLine"/> 56 <exclude name="PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket"/> 57 <exclude name="PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket"/> 58 <exclude name="PSR2.Methods.FunctionCallSignature.MultipleArguments"/> 59 <exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/> 60 <exclude name="PSR2.Methods.MethodDeclaration.StaticBeforeVisibility"/> 61 <exclude name="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/> 62 <exclude name="PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse"/> 63 64 <exclude name="PSR12.Classes.ClassInstantiation.MissingParentheses"/> 65 <exclude name="PSR12.Classes.OpeningBraceSpace.Found"/> 66 <exclude name="PSR12.ControlStructures.BooleanOperatorPlacement.FoundMixed"/> 67 <exclude name="PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine"/> 68 <exclude name="PSR12.ControlStructures.ControlStructureSpacing.CloseParenthesisLine"/> 69 <exclude name="PSR12.ControlStructures.ControlStructureSpacing.LineIndent"/> 70 <exclude name="PSR12.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/> 71 <exclude name="PSR12.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace"/> 72 <exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/> 73 <exclude name="PSR12.Operators.OperatorSpacing.NoSpaceBefore"/> 74 <exclude name="PSR12.Operators.OperatorSpacing.NoSpaceAfter"/> 75 </rule> 76 77 <!-- for now we mix declarations and execution here (mostly for defines) --> 78 <rule ref="PSR1.Files.SideEffects"> 79 <exclude-pattern>*/index.php</exclude-pattern> 80 <exclude-pattern>*/inc/parserutils.php</exclude-pattern> 81 <exclude-pattern>*/inc/mail.php</exclude-pattern> 82 <exclude-pattern>*/inc/init.php</exclude-pattern> 83 <exclude-pattern>*/inc/farm.php</exclude-pattern> 84 <exclude-pattern>*/inc/fulltext.php</exclude-pattern> 85 <exclude-pattern>*/inc/pluginutils.php</exclude-pattern> 86 <exclude-pattern>*/inc/indexer.php</exclude-pattern> 87 <exclude-pattern>*/inc/Mailer.class.php</exclude-pattern> 88 <exclude-pattern>*/doku.php</exclude-pattern> 89 <exclude-pattern>*/install.php</exclude-pattern> 90 <exclude-pattern>*/inc/utf8.php</exclude-pattern> 91 <exclude-pattern>*/feed.php</exclude-pattern> 92 <exclude-pattern>*/inc/load.php</exclude-pattern> 93 <exclude-pattern>*/bin/*.php</exclude-pattern> 94 <exclude-pattern>*/lib/exe/*.php</exclude-pattern> 95 </rule> 96 97</ruleset> 98