codeclimate phpcodesniffer
b53
codeclimate-phpcodesniffer是一种代码气候引擎,它包含PHP_CODE SNIFFER静态分析工具。您可以使用代码气候CLI或我们托管的分析平台在命令行上运行它。
php_codesniffer可帮助您检测违反定义的编码标准。
codeclimate engines:enable phpcodesniffer 。此命令同时安装引擎并在.codeclimate.yml文件中启用它。codeclimate analyze 。根据php_codesniffer文档格式化这些配置选项的值。
exclude_paths:
- "/examples/**/*"
engines:
phpcodesniffer:
enabled: true
config:
file_extensions: "php,inc,lib"
standard: "PSR1,PSR2,my_custom_php_ruleset.xml"
ignore_warnings: true
encoding: utf-8
ratings:
paths:
- "**.php"
除了默认情况下,还支持使用Php_codesniffer提供的标准外,还支持Drupal,WordPress,YII2和Magento扩展编码标准。这是完整列表:
有关php_codesniffer的帮助,请查看其文档。
如果您遇到了代码气候问题,请首先查看该项目的GitHub问题,因为您的问题可能已经涵盖。如果没有,请继续与我们打开支持票。