vralfy / phpcsmd

Netbeans plugin to report code measurements generated by phpcs, phpmd, phpcpd and pdepend as Tasks and Annotations
27 stars 6 forks source link

Feature - Follow custom rulesets from files (xml) #50

Open milindmore22 opened 4 years ago

milindmore22 commented 4 years ago

This has been working great, but need a feature where it can follow custom ruleset files like if they exits phpcs.xml, phpcs.xml.dist, phpcs.ruleset.xml and ruleset.xml eg:

<?xml version="1.0"?>
<ruleset name="VIP-Go-Skeleton">
    <description>WordPress and VIP Go Coding Standards</description>

    <rule ref="WordPress">
        <exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
        <exclude name="WordPress.Files.FileName.InvalidClassFileName" />
    </rule>

    <rule ref="WordPress-VIP-Go" />

    <rule ref="WordPressVIPMinimum" />

    <rule ref="PHPCompatibility">
        <exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/>
    </rule>

    <config name="testVersion" value="7.0-"/>

    <arg name="extensions" value="php"/>
    <arg value="s"/>

    <exclude-pattern>*/node_modules/*</exclude-pattern>
    <exclude-pattern>*/vendor/*</exclude-pattern>
    <exclude-pattern>.github/</exclude-pattern>
    <exclude-pattern>*/assets/build/*</exclude-pattern>

</ruleset>

Most Modern Editors/IDE's like Visual studio code, PHP Strom and Atom supports has this feature.

Screenshot from VS code image

Screenshot from Atom image