added wordpress coding standards support

This commit is contained in:
Abhijit Bhatnagar 2025-08-08 13:04:59 +05:30
parent bf066a815f
commit d106c178ac
3 changed files with 493 additions and 0 deletions

32
phpcs.xml.dist Normal file
View file

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<ruleset name="Helix Plugin WordPress Coding Standards">
<description>Apply WordPress Coding Standards to the Helix plugin.</description>
<!-- Scan only this plugin -->
<file>./</file>
<!-- Ignore non-PHP and build artifacts -->
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>build/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<!-- PHPCS args -->
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<!-- Apply WordPress rulesets (requires WPCS installed) -->
<rule ref="WordPress"/>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Docs"/>
<!-- Optional: flag missing text domains in i18n functions -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain">
<element value="helix"/>
</property>
</properties>
</rule>
</ruleset>