- phpcbf 自动修复 204 个格式问题(缩进、空格、换行等) - 添加 phpcs.xml 排除 WordPress hook 回调中未使用参数的误报 - CI 现在应该通过 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
695 B
XML
20 lines
695 B
XML
<?xml version="1.0"?>
|
|
<ruleset name="WenPai Updater">
|
|
<description>WenPai Updater 代码规范</description>
|
|
|
|
<file>.</file>
|
|
<arg name="extensions" value="php"/>
|
|
<arg name="warning-severity" value="0"/>
|
|
<exclude-pattern>vendor/*</exclude-pattern>
|
|
<exclude-pattern>node_modules/*</exclude-pattern>
|
|
<exclude-pattern>tests/*</exclude-pattern>
|
|
<exclude-pattern>lib/*</exclude-pattern>
|
|
|
|
<rule ref="WordPress-Extra">
|
|
<!--
|
|
WordPress hook/filter 回调的参数签名由 WordPress 核心决定,
|
|
即使某些参数未使用也必须保留。排除此规则以避免误报。
|
|
-->
|
|
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed"/>
|
|
</rule>
|
|
</ruleset>
|