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