cocart-headless / cocart-sniffs
CoCart 开发使用的 PHP_CodeSniffer sniffs 集合。
0.0.3
2024-03-10 17:22 UTC
Requires
- php: >=7.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.0.0
- phpcompatibility/phpcompatibility-wp: 2.1.4
- wp-coding-standards/wpcs: ^3.0.0
This package is auto-updated.
Last update: 2024-09-10 18:26:32 UTC
README
CoCart 的 PHP_CodeSniffer sniffs 集合。
安装
composer require cocart-headless/cocart-sniffs
使用方法
命令行
./vendor/bin/phpcs --standard=CoCart-Core <file>
配置文件
PHPCS 配置文件
<?xml version="1.0"?> <ruleset name="CoCart Coding Standards"> <description>My projects ruleset.</description> <!-- Configs --> <config name="minimum_supported_wp_version" value="5.4" /> <config name="testVersion" value="7.2-" /> <!-- Rules --> <rule ref="CoCart-Core" /> <rule ref="WordPress.WP.I18n"> <properties> <property name="text_domain" type="array" value="new-text-domain" /> </properties> </rule> <rule ref="PHPCompatibility"> <exclude-pattern>tests/</exclude-pattern> </rule> </ruleset>