Sublime Text 3 phpcs 配置

具体下载地址看这个 http://my.oschina.net/qsmoon/blog/280813

,我只是单纯的帖一下自己配置作为备份

{
    // Example for:
    // - Windows 7
    // - With phpcs and php-cs-fixer support
    // We want debugging on
    "show_debug": true,
    // Only execute the plugin for php files
    "extensions_to_execute": ["php"],
    // Do not execute for twig files
    "extensions_to_blacklist": ["twig.php"],
    // Execute the sniffer on file save
    "phpcs_execute_on_save": true,
    // 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,
    // Path to php on windows installation
    // This is needed as we cannot run phars on windows, so we run it through php
    "phpcs_php_prefix_path": "D:\\program files\\wamp\\bin\\php\\php5.4.12\\php.exe",
    // We want the fixer to be run through the php application
    "phpcs_commands_to_php_prefix": ["Fixer"],
    // PHP_CodeSniffer settings
    // Yes, run the phpcs command
    "phpcs_sniffer_run": true,
    // And execute it on save
    "phpcs_command_on_save": true,
    // This is the path to the bat file when we installed PHP_CodeSniffer
    "phpcs_executable_path": "D:\\program files\\wamp\\bin\\php\\php5.4.12\\phpcs.bat",
    // I want to run the PSR2 standard, and ignore warnings
    "phpcs_additional_args": {
        "--standard": "PSR2",
        "-n": ""
    },
    // PHP-CS-Fixer settings
    // Don‘t want to auto fix issue with php-cs-fixer
    "php_cs_fixer_on_save": false,
    // Show the quick panel
    "php_cs_fixer_show_quick_panel": true,
    // The fixer phar file is stored here:
    "php_cs_fixer_executable_path": "D:\\program files\\wamp\\bin\\php\\php5.4.12\\php-cs-fixer.phar",
    // Additional arguments, run all levels of fixing
    "php_cs_fixer_additional_args": {
        "--level": "all"
    },
    // PHP Linter settings
    // Yes, lets lint the files
    "phpcs_linter_run": true,
    // And execute that on each file when saved (php only as per extensions_to_execute)
    "phpcs_linter_command_on_save": true,
    // Path to php
    "phpcs_php_path": "D:\\program files\\wamp\\bin\\php\\php5.4.12\\php.exe",
    // This is the regex format of the errors
    "phpcs_linter_regex": "(?P<message>.*) on line (?P<line>\\d+)",
    // PHP Mess Detector settings
    // Not turning on the mess detector here
    "phpmd_run": false,
    "phpmd_command_on_save": false,
    "phpmd_executable_path": "",
    "phpmd_additional_args": {}
}

Sublime Text 3 phpcs 配置

时间: 2024-08-02 10:24:35

Sublime Text 3 phpcs 配置的相关文章

Sublime Text 3 python 配置

Sublime Text 3 python 配置 Package Control 安装方法 1.通过快捷键 ctrl+` 或者 View > Show Console 打开控制台,然后粘贴相应的 Python 安装代码: 2.Sublime Text 3 安装代码并回车: import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib

Sublime Text 3 个人配置

换电脑,Sublime Text 3 重新配置一遍,做个记录 1. 下载:http://www.sublimetext.com/3 2. 插件管理器 Package Control (Ctrl + `) 1 import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.r

Ubuntu16.04安装sublime text 3并配置Python开发环境

打开终端,添加sublime text 3的仓库: sudo add-apt-repository ppa:webupd8team/sublime-text-3 按enter键继续 更新软件库: sudo apt-get update 安装Sublime Text 3: sudo apt-get install sublime-text-installer 安装package control: ctr+`调出控制台然后粘贴如下python代码: import urllib.request,os,

[开发工具]_[Sublime Text 2]_[配置C++编译运行环境]

场景: 1. g++的版本更新比较快,可以使用最新的C++11特性, 这里sublime text 2是我的轻量级C++开发工具(只有这个),可以使用st2这种工具来验证一些语法新特性. 2. st2的好处是免费, 还有支持多语言的语法高亮和函数outline 3. 当然st2也支持插件开发. 4. 给sublime text 2添加选中文件右键打开看这里: http://blog.csdn.net/infoworld/article/details/18771731 步骤 配置C++编译选项

sublime text 3 + python配置,完整搭建及常用插件安装

四年的时间,一直使用EmEditor编辑器进行Python开发,之前是做面向过程,只需要将一个单独的py文件维护好即可,用着也挺顺手,但是最近在做面向对象的开发,不同的py文件中相互关联较多,感觉单纯使用EmEditor编辑器确实有些低效(主要是对EmEditor的插件都不熟悉,然后逐个py文件的查找). 在网上搜索了一些Python开发的编辑器和IDE,有使用PyCharm,也有使用Eclipse,我安装了PyCharm试了一下,总体感觉太消耗内存,并且启动的时候稍微慢,有些时候还会出现卡顿的

Sublime Text 3中配置运行Java

1.安装JDK并配置环境变量 2.在JDK的bin目录下新建runJava.bat文件,右键选编辑,复制粘贴如下代码并保存: @echo off cd %~dp1 echo Compiling %~nx1...... if exist %~n1.class ( del %~n1.class ) javac -encoding UTF-8 %~nx1 if exist %~n1.class ( echo ------Output------ java %~n1 ) 3.打开Sublime Text

sublime text 3中配置golang开发环境

1:首先下载 Go源码 https://golang.org/dl/  [根据不同的环境选择] 2:新建文件项目文件夹 存放  D:/Go_project 分别建立  bin  src  pkg  子文件夹 3:配置环境变量 GOROOT = "D:\Go"(go安装路径) GOPATH = "D:\Go_project"(自定义) 二.安装Sublime Text     1.下载Sublime Text http://www.sublimetext.com/ 2

Sublime Text 3中配置编译和运行Java的两个方法

方法一: 打开Sublime Text 3,依次点击Preference, Browse Packages,在打开的窗口中双击User文件夹,新建文件JavaC.sublime-build,用记事本打开,粘贴下面的代码并保存关闭: { "cmd": ["javac","-encoding","UTF-8","-d",".","$file"], "file_r

sublime text 3 为配置Python开发环境所做的一些个人设置

我们都知道,ST3(Sublime Text 3)自带的build python可以直接运行.py文件,但是若涉及input()函数需要输入时,就不能用这个了. 下面是我个人所作的一些对我来说算是够用的配置,由于本人还处于初学python的阶段,所以相关配置比较基础与简单. 第一步:下载Sublime Text 下载请去官网下载,下载请视自己的操作系统而定,由于鄙人的系统是Windows,以下皆是以Windows为例展开介绍的. 第二步:Windows 下安装Sublime Text 1. 64