Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ruleset.xml 3.02 KiB
<?xml version="1.0"?>
<ruleset name="DokuWiki">
    <description>DokuWiki Coding Standard</description>

    <!-- ignore 3rd party libraries (that we haven't adopted) -->
    <exclude-pattern>*/lib/plugins/authad/adLDAP/*</exclude-pattern>
    <exclude-pattern>*/lib/scripts/jquery/*</exclude-pattern>
    <exclude-pattern>*/EmailAddressValidator.php</exclude-pattern>
    <exclude-pattern>*/feedcreator.class.php</exclude-pattern>
    <exclude-pattern>*/SimplePie.php</exclude-pattern>
    <exclude-pattern>*/geshi.php</exclude-pattern>
    <exclude-pattern>*/geshi/*</exclude-pattern>
    <exclude-pattern>*/JSON.php</exclude-pattern>

    <!-- ignore devel only parts -->
    <exclude-pattern>*/_test/*</exclude-pattern>
    <exclude-pattern>*/_cs/*</exclude-pattern>

    <rule ref="Generic.Classes.DuplicateClassName" />
    <rule ref="Generic.CodeAnalysis.JumbledIncrementer" />
    <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier" />
    <rule ref="Generic.CodeAnalysis.UnconditionalIfStatement" />
    <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
    <rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall" />
    <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter" />
    <rule ref="Generic.CodeAnalysis.EmptyStatement" />
    <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
    <rule ref="Generic.Commenting.Todo" />
    <rule ref="Generic.Files.ByteOrderMark" />
    <rule ref="Generic.Files.LineEndings" />
    <rule ref="Generic.Formatting.DisallowMultipleStatements" />
    <rule ref="Generic.Metrics.NestingLevel">
        <properties>
            <property name="nestingLevel" value="6" />
        </properties>
    </rule>
    <rule ref="Generic.NamingConventions.UpperCaseConstantName" />
    <rule ref="Generic.PHP.LowerCaseConstant" />
    <rule ref="Generic.PHP.DeprecatedFunctions.php" />
    <rule ref="Generic.PHP.DisallowShortOpenTag" />
    <rule ref="Generic.PHP.ForbiddenFunctions" />
    <rule ref="Generic.WhiteSpace.DisallowTabIndent" />
    <rule ref="Generic.Classes.DuplicateClassName" />
    <rule ref="Generic.Functions.CallTimePassByReference" />
    <rule ref="Zend.Files.ClosingTag" />
    <rule ref="PEAR.Functions.ValidDefaultValue" />
    <rule ref="Squiz.PHP.Eval" />
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
    <rule ref="Squiz.CSS.LowercaseStyleDefinition" />
    <rule ref="Squiz.CSS.MissingColon" />
    <rule ref="Squiz.CSS.DisallowMultipleStyleDefinitions" />
    <rule ref="Squiz.CSS.ColonSpacing" />
    <rule ref="Squiz.CSS.ClassDefinitionClosingBraceSpace" />
    <rule ref="Squiz.CSS.SemicolonSpacing" />
    <rule ref="Squiz.CSS.Indentation" />
    <rule ref="Squiz.CSS.EmptyClassDefinition" />
    <rule ref="Squiz.CSS.ClassDefinitionNameSpacing" />
    <rule ref="Squiz.CSS.EmptyStyleDefinition" />
    <rule ref="Squiz.CSS.Opacity" />
    <rule ref="Squiz.CSS.ColourDefinition" />
    <rule ref="Squiz.CSS.DuplicateClassDefinition" />
    <rule ref="Squiz.CSS.ClassDefinitionOpeningBraceSpace" />
    <rule ref="Squiz.Commenting.DocCommentAlignment" />

</ruleset>