D3R / standards

D3R Coding standards
1 stars 2 forks source link

Add PHPMD XML #1

Open neild3r opened 9 years ago

neild3r commented 9 years ago

I think we should add in an extra XML for the PHP Mess Detector.

Something like the below

<?xml version="1.0"?>
<ruleset name="D3R Mess Detector Config"
         xmlns="http://pmd.sf.net/ruleset/1.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
                     http://pmd.sf.net/ruleset_xml_schema.xsd"
         xsi:noNamespaceSchemaLocation="
                     http://pmd.sf.net/ruleset_xml_schema.xsd">
    <description>
        Custom setup for D3R
    </description>

    <rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" />

    <rule ref="rulesets/codesize.xml" />

    <rule ref="rulesets/codesize.xml">
        <exclude name="CamelCaseClassName" />
        <exclude name="CamelCasePropertyName" />
    </rule>

    <rule ref="rulesets/design.xml" />

    <rule ref="rulesets/naming.xml">
        <exclude name="ShortVariable" />
    </rule>

    <rule ref="rulesets/unusedcode.xml" />
</ruleset>
dmnc commented 9 years ago

Sure. I have a sass lint one somewhere too

On 2 October 2015 at 16:09, Neil Brayfield notifications@github.com wrote:

I think we should add in an extra XML for the PHP Mess Detector.

Something like the below

<?xml version="1.0"?> <ruleset name="D3R Mess Detector Config" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation=" http://pmd.sf.net/ruleset_xml_schema.xsd">

Custom setup for D3R
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" />

<rule ref="rulesets/codesize.xml" />

<rule ref="rulesets/codesize.xml">
    <exclude name="CamelCaseClassName" />
    <exclude name="CamelCasePropertyName" />
</rule>

<rule ref="rulesets/design.xml" />

<rule ref="rulesets/naming.xml">
    <exclude name="ShortVariable" />
</rule>

<rule ref="rulesets/unusedcode.xml" />

— Reply to this email directly or view it on GitHub https://github.com/D3R/standards/issues/1.

Dominic Morgan D3R Ltd 0333 800 2288 dom@d3r.com http://d3r.com