PHP代码规范性检测
来源:互联网 发布:淘宝远程付款靠谱吗 编辑:程序博客网 时间:2024/05/16 08:21
安装
wget -c http://static.phpmd.org/php/latest/phpmd.phar
mv phpmd.phar /usr/bin/phpmd
chmod +x /usr/bin/phpmd
#使用选项
使用:
# phpmd 代码路径 报告格式 规则xml文件 并使用 > 命令将问题报告输出到文件
eg:
phpmd /Library/WebServer/Documents/php/app/ html codesize,unusedcode,naming > ~/Desktop/res.html
#使用选项
zjs:php jun$ phpmd
Mandatory arguments:
1) A php source code filename or directory. Can be a comma-separated string
2) A report format
3) A ruleset filename or a comma-separated string of rulesetfilenames
Available formats: xml, text, html.
Available rulesets: cleancode, codesize, controversial, design, naming, unusedcode.
Optional arguments that may be put after the mandatory arguments:
--minimumpriority: rule priority threshold; rules with lower priority than this will not be used
--reportfile: send report output to a file; default to STDOUT
--suffixes: comma-separated string of valid source code filename extensions, e.g. php,phtml
--exclude: comma-separated string of patterns that are used to ignore directories
--strict: also report those nodes with a @SuppressWarnings annotation
--ignore-violations-on-exit: will exit with a zero code, even if any violations are found
阅读全文
0 0
- PHP代码规范性检测
- xml规范性检测
- 代码的规范性总结
- 书写代码的规范性
- 代码的规范性
- 代码的规范性
- 代码规范性思考
- 代码设计的规范性
- 代码的规范性
- java代码的规范性
- 代码规范性改进
- 代码规范性与品质问题~
- 代码的规范性总结[转]
- 代码规范性与品质问题~
- 规范性附录 属性值代码
- PHP 代码安全检测
- PHP 代码安全检测
- PHP检测代码执行时间
- PHP超全局数组解析-SERVER
- 依山傍水,云淡风轻-----只是传说
- cas单点登录的开发文档地址
- C/C++中未定义行为
- 10:Hello, World!的大小
- PHP代码规范性检测
- Java中i++,++i 和i= i+ 1的区别
- SEO大事件:百度站长平台推出"新站加速收录"计划!
- 如果看了此文你还不懂傅里叶变换,那就过来掐死我吧【完整版】
- Dynamics CRM 自动生成实体关系图(ER Model)
- poi报表导出
- HDU 1078 搜索+记忆化
- (2017.08.21-2017.08.25)周总结-项目开发管理总结
- [paper] ICNet