|
| 1 | +<?xml version="1.0"?> |
| 2 | +<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 | + name="Starisian WordPress Plugin" |
| 4 | + xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/PHPCSStandards/PHP_CodeSniffer/master/phpcs.xsd"> |
| 5 | + |
| 6 | + <description> |
| 7 | + WordPress coding standards for Starisian Technologies plugins. Includes support for Docs, I18n, and performance best practices. |
| 8 | + </description> |
| 9 | + |
| 10 | + <!-- Scan all files in the plugin root --> |
| 11 | + <file>.</file> |
| 12 | + |
| 13 | + <!-- Exclude unnecessary paths --> |
| 14 | + <exclude-pattern>vendor/*</exclude-pattern> |
| 15 | + <exclude-pattern>node_modules/*</exclude-pattern> |
| 16 | + <exclude-pattern>*.min.js</exclude-pattern> |
| 17 | + <exclude-pattern>tests/*</exclude-pattern> |
| 18 | + <exclude-pattern>wp-assets/*</exclude-pattern> |
| 19 | + |
| 20 | + <!-- Basepath --> |
| 21 | + <arg name="basepath" value="."/> |
| 22 | + |
| 23 | + <!-- Parallel processing --> |
| 24 | + <arg name="parallel" value="8"/> |
| 25 | + |
| 26 | + <!-- Coding standard rules --> |
| 27 | + <rule ref="WordPress-Extra"/> |
| 28 | + <rule ref="WordPress-Docs"/> |
| 29 | + <rule ref="Generic.Commenting.Todo"/> |
| 30 | + |
| 31 | + <!-- Minimum WordPress version for compatibility checks --> |
| 32 | + <config name="minimum_wp_version" value="6.4"/> |
| 33 | + |
| 34 | + <!-- Text domain config (override per project if needed) --> |
| 35 | + <rule ref="WordPress.WP.I18n"> |
| 36 | + <properties> |
| 37 | + <property name="text_domain" type="array"> |
| 38 | + <element value="plugin-textdomain"/> |
| 39 | + </property> |
| 40 | + </properties> |
| 41 | + </rule> |
| 42 | + |
| 43 | + <!-- Global prefix enforcement --> |
| 44 | + <rule ref="WordPress.NamingConventions.PrefixAllGlobals"> |
| 45 | + <properties> |
| 46 | + <property name="prefixes" type="array"> |
| 47 | + <element value="starisian"/> |
| 48 | + </property> |
| 49 | + </properties> |
| 50 | + </rule> |
| 51 | + |
| 52 | + <!-- Exclude certain sniffs in test files --> |
| 53 | + <rule ref="WordPress.WP.GlobalVariablesOverride"> |
| 54 | + <exclude-pattern>tests/*Test.php</exclude-pattern> |
| 55 | + </rule> |
| 56 | + <rule ref="WordPress.Files.FileName"> |
| 57 | + <exclude-pattern>tests/*Test.php</exclude-pattern> |
| 58 | + </rule> |
| 59 | + |
| 60 | + <!-- Optional: Uncomment if PHPCompatibilityWP is installed --> |
| 61 | + <!-- |
| 62 | + <config name="testVersion" value="8.2-"/> |
| 63 | + <rule ref="PHPCompatibilityWP"> |
| 64 | + <include-pattern>*.php</include-pattern> |
| 65 | + </rule> |
| 66 | + --> |
| 67 | + |
| 68 | +</ruleset> |
0 commit comments