chrometoaster / backend-coding-standards
Chrometoaster使用的后端编码规范配置。
1.4.0
2022-09-14 23:21 UTC
Requires
- php: 7.x || 8.x
- php-parallel-lint/php-console-highlighter: ~1.0
- php-parallel-lint/php-parallel-lint: ~1.3
- symplify/easy-coding-standard: ~11.1
README
Chrometoaster(https://www.chrometoaster.com)使用的后端编码规范基于PSR-2。
本项目捆绑了工具和预定义的规则集,用于自动化检查。提供的工具包括:
安装与使用
-
安装此软件包
$ composer require --dev chrometoaster/backend-coding-standards:~1.0
-
在您的
easy-coding-standard.yml
中包含配置文件imports: - { resource: '%vendor_dir%/chrometoaster/backend-coding-standards/config/chrometoaster.yml' }
-
检查您的文件
$ vendor/bin/parallel-lint /path/to/source/code $ vendor/bin/ecs check path/to/source/code
-
尽可能自动修复不符合规范的文件
$ vendor/bin/ecs check path/to/source/code --fix
有关更多信息,请参阅所用工具的官方文档,例如如何提供自定义配置。
许可协议
BSD-3-Clause