php_codesninffer phpcs用法学习使用:
2016-01-12 19:26
357 查看
18:34 2016/1/12
php_codesninffer phpcs用法学习使用:
可以加一个参数设置结果输出为各种格式:
如source格式:
$ phpcs -s --report=source /path/to/code
原文:
To show source codes instead of friendly names, use the -s command line argument.
Sample PHP_CodeSniffer source code output
$ phpcs -s --report=source /path/to/code
输出显示时显示屏幕一般很小,可以设置屏幕大小:
Specifying a Report Width
By default, PHP_CodeSniffer will print all screen-based reports 80 characters wide. File paths will be truncated if they don't fit within this limit and error messages will be wrapped across multiple lines. You can increase the report width to show longer file paths and limit the wrapping of error messages using the -report-width command line argument.
Setting the report width to be 120 characters
$ phpcs --report-width=120 --report=summary /path/to/code/myfile.php
很有用的是可以不输出到屏幕而保存到文件进行查看:
Writing a full report to a file and a summary report to the screen
$ phpcs --report-full=/path/to/full.txt --report-summary /path/to/code
很有用的一个用法,把结果输出到屏幕的同时保存到文件:
把phpcs + 文件名运行的结果输出到屏幕的同时输入保存到一个指定文件:
phpcs --reprt-full=保存的文件 index.php
原文:
Writing a Report to a File
PHP_CodeSniffer always prints the specified report to the screen, but it can also be told to write a copy of the report to a file. When writing to a file, all internal parsing errors and verbose output PHP_CodeSniffer produces will not be included in the file. This feature is particularly useful when using report types such as XML and CSV that are often parsed by scripts or used with continuous integration software.
To write a copy of a report to a file, use the --report-file command line argument.
Writing a report to a file
$ phpcs --report=xml --report-file=/path/to/file.xml /path/to/code
也可以把结果部分保存到文件,部分输出大屏幕:
You can print some reports to the screen and other reports to files.
Writing a full report to a file and a summary report to the screen
$ phpcs --report-full=/path/to/full.txt --report-summary /path/to/code
还可以输出不同格式到不同的多个文件:
You can write the reports to separate files by specifying the path to the output file after each report argument.
Writing a full and summary report to a file
$ phpcs --report-full=/path/to/full.txt --report-summary=/path/to/summary.txt /path/to/code
php_codesninffer phpcs用法学习使用:
可以加一个参数设置结果输出为各种格式:
如source格式:
$ phpcs -s --report=source /path/to/code
原文:
To show source codes instead of friendly names, use the -s command line argument.
Sample PHP_CodeSniffer source code output
$ phpcs -s --report=source /path/to/code
输出显示时显示屏幕一般很小,可以设置屏幕大小:
Specifying a Report Width
By default, PHP_CodeSniffer will print all screen-based reports 80 characters wide. File paths will be truncated if they don't fit within this limit and error messages will be wrapped across multiple lines. You can increase the report width to show longer file paths and limit the wrapping of error messages using the -report-width command line argument.
Setting the report width to be 120 characters
$ phpcs --report-width=120 --report=summary /path/to/code/myfile.php
很有用的是可以不输出到屏幕而保存到文件进行查看:
Writing a full report to a file and a summary report to the screen
$ phpcs --report-full=/path/to/full.txt --report-summary /path/to/code
很有用的一个用法,把结果输出到屏幕的同时保存到文件:
把phpcs + 文件名运行的结果输出到屏幕的同时输入保存到一个指定文件:
phpcs --reprt-full=保存的文件 index.php
原文:
Writing a Report to a File
PHP_CodeSniffer always prints the specified report to the screen, but it can also be told to write a copy of the report to a file. When writing to a file, all internal parsing errors and verbose output PHP_CodeSniffer produces will not be included in the file. This feature is particularly useful when using report types such as XML and CSV that are often parsed by scripts or used with continuous integration software.
To write a copy of a report to a file, use the --report-file command line argument.
Writing a report to a file
$ phpcs --report=xml --report-file=/path/to/file.xml /path/to/code
也可以把结果部分保存到文件,部分输出大屏幕:
You can print some reports to the screen and other reports to files.
Writing a full report to a file and a summary report to the screen
$ phpcs --report-full=/path/to/full.txt --report-summary /path/to/code
还可以输出不同格式到不同的多个文件:
You can write the reports to separate files by specifying the path to the output file after each report argument.
Writing a full and summary report to a file
$ phpcs --report-full=/path/to/full.txt --report-summary=/path/to/summary.txt /path/to/code
相关文章推荐
- 主流浏览器内核介绍(前端开发值得了解的浏览器内核历史)
- 在Django下使用Jquery ajax实现select表单的二级联动
- HTML学习笔记
- 网页抓取jsoup
- 03.Web大前端时代之:HTML5+CSS3入门系列~H5功能元素
- Libevent参考手册:evbuffer:缓冲IO实用功能
- js-实现集合的操作
- 浏览器
- ------javascript------N
- 利用html 和css模仿必应搜索主页。(一)
- 前端开发框架对比
- jquery实现横向图片滚动
- ajaxFileUpload 报这错jQuery.handleError is not a function (注:内容完全是转载,只是便于以后自己查阅)
- 如何让html输入域中只填写英文,不能填写中文
- angular调用WCF服务,读取文件夹下图片显示列表,下载另存为图片
- js打印---我传给肖方username和userpassword,他在后端处理完成,返回给我。
- JQuery前端技术记录
- web导航栏点击跳转后的样式
- 启动jetty后,访问jsp页面报500错: JSP support not configured
- CSS之各种居中