osx-mac下sublimetext3的php错误提示插件phpcodesniffer安装后,无法显示php错误
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了osx-mac下sublimetext3的php错误提示插件phpcodesniffer安装后,无法显示php错误,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含8946字,纯文字阅读大概需要13分钟。
内容图文
![osx-mac下sublimetext3的php错误提示插件phpcodesniffer安装后,无法显示php错误](/upload/InfoBanner/zyjiaocheng/243/d7a32105d8144c1cbdf0c84b241d27dc.jpg)
mac下安装了sublime text3后持续安装了一些插件,其中有php code sniffer,简称phpcs。用来提示php语法错误的。安装后,无法显示,我根据官网的提示,安装了phpcs需要的一些插件,包括:php-cs-fixer,phpcbf,phpmd.并且配置了phpcs的文件然而还是无法提示。
附上配置文件:
\这里开始
{
// Plugin settings
// Turn the debug output on/off
"show_debug": true,
// Which file types (file extensions), do you want the plugin to
// execute for
"extensions_to_execute": ["php"],
// Do we need to blacklist any sub extensions from extensions_to_execute
// An example would be ["twig.php"]
"extensions_to_blacklist": ["twig.php"],
// Execute the sniffer on file save
"phpcs_execute_on_save": false,
// Show the error list after save.
"phpcs_show_errors_on_save": true,
// Show the errors in the gutter
"phpcs_show_gutter_marks": true,
// Show outline for errors
"phpcs_outline_for_errors": true,
// Show the errors in the status bar
"phpcs_show_errors_in_status": true,
// Show the errors in the quick panel so you can then goto line
"phpcs_show_quick_panel": true,
// The path to the php executable.
// Needed for windows, or anyone who doesn't/can't make phars
// executable. Avoid setting this if at all possible
"phpcs_php_prefix_path": "",
// Options include:
// - Sniffer
// - Fixer
// - Mess Detector
//
// This will prepend the application with the path to php
// Needed for windows, or anyone who doesn't/can't make phars
// executable. Avoid setting this if at all possible
"phpcs_commands_to_php_prefix": [],
// What color to stylise the icon
// https://www.sublimetext.com/docs/3/api_reference.html#sublime.View
// add_regsions
"phpcs_icon_scope_color": "comment",
// PHP_CodeSniffer settings
// Do you want to run the phpcs checker?
"phpcs_sniffer_run": true,
// Execute the sniffer on file save
"phpcs_command_on_save": true,
// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_executable_path": "/usr/local/bin/phpcs",
// Additional arguments you can specify into the application
//
// Example:
// {
// "--standard": "PEAR",
// "-n"
// }
"phpcs_additional_args": {
"--standard": "PSR2",
"--config-set": "show_warnings 0",
"-n": "",
"-l":""
},
// PHP-CS-Fixer settings
// Fix the issues on save
"php_cs_fixer_on_save": false,
// Show the quick panel
"php_cs_fixer_show_quick_panel": true,
// Path to where you have the php-cs-fixer installed
"php_cs_fixer_executable_path": "/usr/local/bin/php-cs-fixer",
// Additional arguments you can specify into the application
"php_cs_fixer_additional_args": {
"--level": "all"
},
// phpcbf settings
// Fix the issues on save
"phpcbf_on_save": true,
// Show the quick panel
"phpcbf_show_quick_panel": true,
// Path to where you have the phpcbf installed
"phpcbf_executable_path": "/usr/local/bin/phpcbf",
// Additional arguments you can specify into the application
//
// Example:
// {
// "--level": "all"
// }
"phpcbf_additional_args": {
"--standard": "PSR2",
"-n": ""
},
// PHP Linter settings
// Are we going to run php -l over the file?
"phpcs_linter_run": true,
// Execute the linter on file save
"phpcs_linter_command_on_save": true,
// It seems python/sublime cannot always find the php application
// If empty, then use PATH version of php, else use the set value
"phpcs_php_path": "",
// What is the regex for the linter? Has to provide a named match for 'message' and 'line'
"phpcs_linter_regex": "(?P.*) on line (?P\\d+)",
// PHP Mess Detector settings
// Execute phpmd
"phpmd_run": true,
// Execute the phpmd on file save
"phpmd_command_on_save": true,
// It seems python/sublime cannot always find the phpmd application
// If empty, then use PATH version of phpmd, else use the set value
"phpmd_executable_path": "/usr/local/bin/phpmd",
// Additional arguments you can specify into the application
//
// Example:
// {
// "codesize,unusedcode"
// }
"phpmd_additional_args": {
"codesize,unusedcode,naming": ""
},
// PHP Scheck settings
// Execute scheck
"scheck_run": false,
// Execute the scheck on file save
"scheck_command_on_save": false,
// It seems python/sublime cannot always find the scheck application
// If empty, then use PATH version of scheck, else use the set value
"scheck_executable_path": "",
// Additional arguments you can specify into the application
//
//Example:
//{
// "-php_stdlib" : "/path/to/pfff",
// "-strict" : ""
//}
"scheck_additional_args": {
"-strict" : ""
}
}
//这里结束
下面是安装完,错误依旧没提示。
有朋友用过这个插件的么,帮下忙啊!!!
回复内容:
mac下安装了sublime text3后持续安装了一些插件,其中有php code sniffer,简称phpcs。用来提示php语法错误的。安装后,无法显示,我根据官网的提示,安装了phpcs需要的一些插件,包括:php-cs-fixer,phpcbf,phpmd.并且配置了phpcs的文件然而还是无法提示。
附上配置文件:
\这里开始
{
// Plugin settings
// Turn the debug output on/off
"show_debug": true,
// Which file types (file extensions), do you want the plugin to
// execute for
"extensions_to_execute": ["php"],
// Do we need to blacklist any sub extensions from extensions_to_execute
// An example would be ["twig.php"]
"extensions_to_blacklist": ["twig.php"],
// Execute the sniffer on file save
"phpcs_execute_on_save": false,
// Show the error list after save.
"phpcs_show_errors_on_save": true,
// Show the errors in the gutter
"phpcs_show_gutter_marks": true,
// Show outline for errors
"phpcs_outline_for_errors": true,
// Show the errors in the status bar
"phpcs_show_errors_in_status": true,
// Show the errors in the quick panel so you can then goto line
"phpcs_show_quick_panel": true,
// The path to the php executable.
// Needed for windows, or anyone who doesn't/can't make phars
// executable. Avoid setting this if at all possible
"phpcs_php_prefix_path": "",
// Options include:
// - Sniffer
// - Fixer
// - Mess Detector
//
// This will prepend the application with the path to php
// Needed for windows, or anyone who doesn't/can't make phars
// executable. Avoid setting this if at all possible
"phpcs_commands_to_php_prefix": [],
// What color to stylise the icon
// https://www.sublimetext.com/docs/3/api_reference.html#sublime.View
// add_regsions
"phpcs_icon_scope_color": "comment",
// PHP_CodeSniffer settings
// Do you want to run the phpcs checker?
"phpcs_sniffer_run": true,
// Execute the sniffer on file save
"phpcs_command_on_save": true,
// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_executable_path": "/usr/local/bin/phpcs",
// Additional arguments you can specify into the application
//
// Example:
// {
// "--standard": "PEAR",
// "-n"
// }
"phpcs_additional_args": {
"--standard": "PSR2",
"--config-set": "show_warnings 0",
"-n": "",
"-l":""
},
// PHP-CS-Fixer settings
// Fix the issues on save
"php_cs_fixer_on_save": false,
// Show the quick panel
"php_cs_fixer_show_quick_panel": true,
// Path to where you have the php-cs-fixer installed
"php_cs_fixer_executable_path": "/usr/local/bin/php-cs-fixer",
// Additional arguments you can specify into the application
"php_cs_fixer_additional_args": {
"--level": "all"
},
// phpcbf settings
// Fix the issues on save
"phpcbf_on_save": true,
// Show the quick panel
"phpcbf_show_quick_panel": true,
// Path to where you have the phpcbf installed
"phpcbf_executable_path": "/usr/local/bin/phpcbf",
// Additional arguments you can specify into the application
//
// Example:
// {
// "--level": "all"
// }
"phpcbf_additional_args": {
"--standard": "PSR2",
"-n": ""
},
// PHP Linter settings
// Are we going to run php -l over the file?
"phpcs_linter_run": true,
// Execute the linter on file save
"phpcs_linter_command_on_save": true,
// It seems python/sublime cannot always find the php application
// If empty, then use PATH version of php, else use the set value
"phpcs_php_path": "",
// What is the regex for the linter? Has to provide a named match for 'message' and 'line'
"phpcs_linter_regex": "(?P.*) on line (?P\\d+)",
// PHP Mess Detector settings
// Execute phpmd
"phpmd_run": true,
// Execute the phpmd on file save
"phpmd_command_on_save": true,
// It seems python/sublime cannot always find the phpmd application
// If empty, then use PATH version of phpmd, else use the set value
"phpmd_executable_path": "/usr/local/bin/phpmd",
// Additional arguments you can specify into the application
//
// Example:
// {
// "codesize,unusedcode"
// }
"phpmd_additional_args": {
"codesize,unusedcode,naming": ""
},
// PHP Scheck settings
// Execute scheck
"scheck_run": false,
// Execute the scheck on file save
"scheck_command_on_save": false,
// It seems python/sublime cannot always find the scheck application
// If empty, then use PATH version of scheck, else use the set value
"scheck_executable_path": "",
// Additional arguments you can specify into the application
//
//Example:
//{
// "-php_stdlib" : "/path/to/pfff",
// "-strict" : ""
//}
"scheck_additional_args": {
"-strict" : ""
}
}
//这里结束
下面是安装完,错误依旧没提示。
有朋友用过这个插件的么,帮下忙啊!!!
内容总结
以上是互联网集市为您收集整理的osx-mac下sublimetext3的php错误提示插件phpcodesniffer安装后,无法显示php错误全部内容,希望文章能够帮你解决osx-mac下sublimetext3的php错误提示插件phpcodesniffer安装后,无法显示php错误所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。