mirror of
https://hk.gh-proxy.com/https://github.com/mcp-wp/mcp-server.git
synced 2025-10-03 21:21:17 +08:00
65 lines
2 KiB
XML
65 lines
2 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="WordPress Coding Standards for MCP Server Plugin">
|
|
<description>A custom set of code standard rules for MCP.</description>
|
|
|
|
<rule ref="WordPress-Core">
|
|
<exclude name="Universal.Arrays.DisallowShortArraySyntax" />
|
|
<exclude name="WordPress.Files.FileName" />
|
|
</rule>
|
|
|
|
<rule ref="WordPress-Docs">
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
<exclude name="Squiz.Commenting" />
|
|
<exclude name="Generic.Commenting.DocComment" />
|
|
</rule>
|
|
|
|
<rule ref="WordPress.WP.I18n">
|
|
<properties>
|
|
<property name="text_domain" value="mcp" />
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- Make sure we prefix everything in the global namespace. -->
|
|
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
|
<properties>
|
|
<property name="prefixes" type="array" value="McpWp,mcp_wp" />
|
|
</properties>
|
|
|
|
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
</rule>
|
|
|
|
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
|
|
<exclude-pattern>mcp.php</exclude-pattern>
|
|
<exclude-pattern>src/functions.php</exclude-pattern>
|
|
</rule>
|
|
|
|
<rule ref="WordPress.Files.FileName">
|
|
<exclude-pattern>tests/*</exclude-pattern>
|
|
</rule>
|
|
|
|
<!-- We only support the latest major WordPress release. -->
|
|
<config name="minimum_supported_wp_version" value="6.7" />
|
|
<rule ref="WordPress.WP.DeprecatedFunctions" />
|
|
|
|
<!-- Check all PHP files in directory tree by default. -->
|
|
<arg name="extensions" value="php"/>
|
|
<file>.</file>
|
|
|
|
<!-- File Layout: Declare symbols or run code, but not both. -->
|
|
<rule ref="PSR1.Files.SideEffects" />
|
|
|
|
<!-- Prevent false positives for IDE annotations. -->
|
|
<rule ref="Squiz.PHP.CommentedOutCode">
|
|
<properties>
|
|
<property name="maxPercentage" value="75" />
|
|
</properties>
|
|
</rule>
|
|
|
|
<!-- Test for PHP compatibility. -->
|
|
<config name="testVersion" value="8.2-"/>
|
|
|
|
<exclude-pattern>*/build/*</exclude-pattern>
|
|
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
|
<exclude-pattern>*/vendor/*</exclude-pattern>
|
|
<exclude-pattern>*/tests/phpunit/bootstrap.php</exclude-pattern>
|
|
</ruleset>
|