Add documentation for code quality tools and standards
This commit is contained in:
57
phpcs-simple.xml
Normal file
57
phpcs-simple.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="WordPress Plugin Starter Template Simple">
|
||||
<description>A simplified ruleset for WordPress Plugin Starter Template.</description>
|
||||
|
||||
<!-- Check all PHP files in directory tree by default. -->
|
||||
<file>.</file>
|
||||
|
||||
<!-- Exclude paths -->
|
||||
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
||||
<exclude-pattern>*/bin/*</exclude-pattern>
|
||||
<exclude-pattern>*/.github/*</exclude-pattern>
|
||||
<exclude-pattern>*/tests/*</exclude-pattern>
|
||||
<exclude-pattern>*/build/*</exclude-pattern>
|
||||
<exclude-pattern>*/dist/*</exclude-pattern>
|
||||
|
||||
<!-- Command line arguments -->
|
||||
<arg value="sp"/>
|
||||
<arg name="extensions" value="php"/>
|
||||
<arg name="basepath" value="."/>
|
||||
<arg name="parallel" value="8"/>
|
||||
|
||||
<!-- Configs -->
|
||||
<config name="minimum_supported_wp_version" value="5.0"/>
|
||||
<config name="testVersion" value="7.0-"/>
|
||||
|
||||
<!-- Rules -->
|
||||
<rule ref="WordPress">
|
||||
<!-- Exclude rules that are too strict for this project -->
|
||||
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
|
||||
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
|
||||
</rule>
|
||||
|
||||
<!-- Additional rules for better code quality -->
|
||||
<rule ref="Generic.Formatting.MultipleStatementAlignment">
|
||||
<properties>
|
||||
<property name="maxPadding" value="1"/>
|
||||
<property name="error" value="false"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Use spaces for indentation -->
|
||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||
<properties>
|
||||
<property name="indent" value="4"/>
|
||||
<property name="tabIndent" value="false"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
|
||||
|
||||
<!-- Enforce proper line endings -->
|
||||
<rule ref="Generic.Files.LineEndings">
|
||||
<properties>
|
||||
<property name="eolChar" value="\n"/>
|
||||
</properties>
|
||||
</rule>
|
||||
</ruleset>
|
||||
Reference in New Issue
Block a user