wpmoo/wpmoo-coding-standards
Composer 安装命令:
composer require wpmoo/wpmoo-coding-standards
包简介
Shared PHPCS standard and custom sniffs for WPMoo projects.
README 文档
README
This repository contains the shared PHP_CodeSniffer (PHPCS) ruleset and custom sniffs used across WPMoo projects.
Installation
Add the package to your project as a development dependency. The package ships as a phpcodesniffer-standard, so the dealerdirect/phpcodesniffer-composer-installer plugin will automatically register the standard with PHPCS.
composer require --dev wpmoo/wpmoo-coding-standards
Usage
Reference the WPMoo standard from your project-level phpcs.xml or phpcs.xml.dist file:
<?xml version="1.0"?> <ruleset name="Project Standard"> <rule ref="WPMoo" /> <file>public_html/wp-content/plugins/example-plugin</file> </ruleset>
Run PHPCS as usual and it will apply the shared rules (WordPress Core + Docs + Extra, PHPCompatibilityWP) plus any custom sniffs provided by this package.
vendor/bin/phpcs
Development
- The canonical ruleset lives in
WPMoo/ruleset.xml. - Custom sniffs are placed under
WPMoo/Sniffsfollowing the PHPCS naming convention. - A local
phpcs.xml.distis provided so you can run the standard on this package itself viacomposer install && vendor/bin/phpcs.
Feel free to extend the rules or add additional sniffs to match the WPMoo guidelines.
统计信息
- 总下载量: 2.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-23