如何为php代码嗅探器调用自定义ruleset.xml
我正在尝试为 php 代码嗅探器编写自定义ruleset.xml,但从命令行调用它而不将其放入默认文件夹似乎不起作用。
因为文档似乎另有说明我想问我是否在这里做错了什么
:~/$ phpcs --standard=/home/edo/custom_ruleset.xml source/
===>
ERROR: the "/home/edo/custom_ruleset.xml" coding standard is not installed.
The installed coding standards are PEAR, PHPCS, Zend, Squiz and MySource
如果这不起作用:关于如何将您自己的编码标准与源代码一起发布的任何建议?谢谢
I'm trying to write an custom ruleset.xml for php code sniffer but calling it from the commandline without putting it in the default folder doesn't seem to work.
Since the documentations seems to state otherwise i'd like to ask if i'm doing something wrong here
:~/$ phpcs --standard=/home/edo/custom_ruleset.xml source/
===>
ERROR: the "/home/edo/custom_ruleset.xml" coding standard is not installed.
The installed coding standards are PEAR, PHPCS, Zend, Squiz and MySource
If that doesn't work: Any suggestions on how to ship your own coding standard with your source ? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您至少需要 版本 1.3.0a1 的代码嗅探器使用带注释的规则集:
在此之前,您必须复制您的规则集,如本教程中所述。
You need at least version 1.3.0a1 of Code Sniffer to use annotated rulesets:
Before that, you had to copy your ruleset, as explained in this tutorial.