phpcsmd icon indicating copy to clipboard operation
phpcsmd copied to clipboard

Feature - Follow custom rulesets from files (xml)

Open milindmore22 opened this issue 4 years ago • 0 comments

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

milindmore22 avatar Jul 17 '20 16:07 milindmore22