ruleset.xml 2.95 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?xml version="1.0"?>
<ruleset name="FDStandard">
    <description>Fusion Directory coding standard.</description>

    <rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman">
        <severity>6</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing">
        <severity>6</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
        <severity>6</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.OperatorSpacing">
        <severity>6</severity>
16 17 18
        <properties>
            <property name="ignoreNewlines" value="true"/>
        </properties>
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
    </rule>
    <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing">
        <severity>6</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.SemicolonSpacing">
        <severity>6</severity>
    </rule>
    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
        <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"/>
        <severity>6</severity>
    </rule>
    <rule ref="Generic.NamingConventions.UpperCaseConstantName">
        <severity>7</severity>
    </rule>
    <rule ref="Generic.NamingConventions.ConstructorName">
        <severity>7</severity>
    </rule>
    <rule ref="Generic.PHP.DeprecatedFunctions">
        <severity>8</severity>
    </rule>
    <rule ref="Generic.PHP.UpperCaseConstant">
        <severity>7</severity>
    </rule>
    <rule ref="Generic.WhiteSpace.DisallowTabIndent">
        <severity>7</severity>
    </rule>
    <rule ref="Generic.WhiteSpace.ScopeIndent" >
        <severity>7</severity>
        <properties>
            <property name="exact" value="false"/> <!-- exact mode is "buggy" : does not detect array identation and so on -->
            <property name="indent" value="2"/>
        </properties>
    </rule>
    <rule ref="PEAR.Commenting.InlineComment">
        <severity>6</severity>
    </rule>
55
    <rule ref="Squiz.PHP.CommentedOutCode">
56 57 58
        <severity>5</severity>
        <properties>
            <property name="maxPercentage" value="50"/>
59
            <!-- RC: 35% is too easily triggered-->
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
        </properties>
    </rule>
    <rule ref="PEAR.WhiteSpace.ScopeClosingBrace">
        <severity>6</severity>
        <properties>
            <property name="indent" value="2"/>
        </properties>
    </rule>
    <rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace">
        <severity>6</severity>
    </rule>
    <rule ref="Squiz.PHP.NonExecutableCode">
        <severity>7</severity>
    </rule>

    <!-- Our own Sniffs -->
    <rule ref="FDStandard.Returns.Parenthesis">
        <severity>7</severity>
    </rule>
    <rule ref="FDStandard.WhiteSpace.AssignmentSpacing">
        <severity>6</severity>
    </rule>
    <rule ref="FDStandard.WhiteSpace.ConditionSpacing">
        <severity>6</severity>
    </rule>
    <rule ref="FDStandard.WhiteSpace.FunctionCallArgumentSpacing">
        <severity>6</severity>
    </rule>
    <rule ref="FDStandard.Foreach.Reference">
        <severity>8</severity>
    </rule>
</ruleset>