热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

macphp错误提示,mac下sublimetext3的php错误提示插件phpcodesniffer安装后,无法显示php错误...

mac下安装了sublimetext3后持续安装了一些插件,其中有phpcodesniffer,简称phpcs。用来提示php语法错误的。安装后,无法显

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" : ""

}

}

//这里结束

下面是安装完,错误依旧没提示。

bVu21J

bVu21K

有朋友用过这个插件的么,帮下忙啊!!!



推荐阅读
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • 本文介绍了pack布局管理器在Perl/Tk中的使用方法及注意事项。通过调用pack()方法,可以控制部件在显示窗口中的位置和大小。同时,本文还提到了在使用pack布局管理器时,应注意将部件分组以便在水平和垂直方向上进行堆放。此外,还介绍了使用Frame部件或Toplevel部件来组织部件在窗口内的方法。最后,本文强调了在使用pack布局管理器时,应避免在中间切换到grid布局管理器,以免造成混乱。 ... [详细]
  • 配置 Sublime Text 2参数
    为什么80%的码农都做不了架构师?二、配置SublimeText2如有需要配置Sublimetext2,需要点击Preferences-Sett ... [详细]
  • SublimeText手冊關於SublimeText台灣「SublimeText台灣」是由愛好者自行成立與維護的網站,目的在於分享各種SublimeText文字編輯器 ... [详细]
  • 关于sublime text3 package control无法使用问题的解决
    关于sublimetext3packagecontrol无法使用问题的解决,Go语言社区,Golang程序员人脉社 ... [详细]
  • 本文介绍了C#中数据集DataSet对象的使用及相关方法详解,包括DataSet对象的概述、与数据关系对象的互联、Rows集合和Columns集合的组成,以及DataSet对象常用的方法之一——Merge方法的使用。通过本文的阅读,读者可以了解到DataSet对象在C#中的重要性和使用方法。 ... [详细]
  • 本文详细介绍了Linux中进程控制块PCBtask_struct结构体的结构和作用,包括进程状态、进程号、待处理信号、进程地址空间、调度标志、锁深度、基本时间片、调度策略以及内存管理信息等方面的内容。阅读本文可以更加深入地了解Linux进程管理的原理和机制。 ... [详细]
  • 后台获取视图对应的字符串
    1.帮助类后台获取视图对应的字符串publicclassViewHelper{将View输出为字符串(注:不会执行对应的ac ... [详细]
  • 《数据结构》学习笔记3——串匹配算法性能评估
    本文主要讨论串匹配算法的性能评估,包括模式匹配、字符种类数量、算法复杂度等内容。通过借助C++中的头文件和库,可以实现对串的匹配操作。其中蛮力算法的复杂度为O(m*n),通过随机取出长度为m的子串作为模式P,在文本T中进行匹配,统计平均复杂度。对于成功和失败的匹配分别进行测试,分析其平均复杂度。详情请参考相关学习资源。 ... [详细]
  • 本文介绍了三种方法来实现在Win7系统中显示桌面的快捷方式,包括使用任务栏快速启动栏、运行命令和自己创建快捷方式的方法。具体操作步骤详细说明,并提供了保存图标的路径,方便以后使用。 ... [详细]
  • REVERT权限切换的操作步骤和注意事项
    本文介绍了在SQL Server中进行REVERT权限切换的操作步骤和注意事项。首先登录到SQL Server,其中包括一个具有很小权限的普通用户和一个系统管理员角色中的成员。然后通过添加Windows登录到SQL Server,并将其添加到AdventureWorks数据库中的用户列表中。最后通过REVERT命令切换权限。在操作过程中需要注意的是,确保登录名和数据库名的正确性,并遵循安全措施,以防止权限泄露和数据损坏。 ... [详细]
  • python3 nmap函数简介及使用方法
    本文介绍了python3 nmap函数的简介及使用方法,python-nmap是一个使用nmap进行端口扫描的python库,它可以生成nmap扫描报告,并帮助系统管理员进行自动化扫描任务和生成报告。同时,它也支持nmap脚本输出。文章详细介绍了python-nmap的几个py文件的功能和用途,包括__init__.py、nmap.py和test.py。__init__.py主要导入基本信息,nmap.py用于调用nmap的功能进行扫描,test.py用于测试是否可以利用nmap的扫描功能。 ... [详细]
  • ihaveusedthedelphidatabindingwizardwithmyxmlfile,andeverythingcompilesandrunsfine. ... [详细]
  • vsCode配置通过Github同步(Settings Sync)
    vsCode配置通过Github同步(Settings Sync) ... [详细]
  • Ubuntu下Sublime Text 2的安装
    nsitionalENhttp:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd ... [详细]
author-avatar
lingling2502852417
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有