ayeo/sniffer

1.0.9 2020-01-15 19:16 UTC

This package is auto-updated.

Last update: 2024-09-16 06:04:22 UTC


README

这是一个仅扫描最近修改行的代码扫描器。在底层,它使用PHPCS并仅过滤特定提交内的修改行报告。我构建了这个简单的工具来支持我的持续集成。它可能对那些处理大型遗留代码库的人很有用。

安装

composer require ayeo/sniffer

用法

从您的项目根目录中输入

./vendor/bin/sniff
./vendor/bin/sniff --standard=/path/to/ruleset.xml

结果(示例)

File: application/modules/behat_api/src/V1/Model/Producer.php
| 4 | error	| Missing class doc comment
| 4 | error	| Opening brace of a class must be on the line after the definition
| 5 | error	| Spaces must be used to indent lines; tabs are not allowed
| 5 | error	| Line indented incorrectly; expected 4 spaces, found 1
| 8 | error	| Spaces must be used to indent lines; tabs are not allowed
| 8 | error	| Line indented incorrectly; expected 4 spaces, found 1
| 9 | error	| Spaces must be used to indent lines; tabs are not allowed
| 9 | error	| Line indented incorrectly; expected 4 spaces, found 1
| 9 | error	| Spaces must be used for alignment; tabs are not allowed

问题

请随时提交问题和改进请求。

贡献

欢迎所有人