sublime 安装phpcs

我这边是用的 sulime 2

直接ctrl+shift+p 输入 install package 敲击回车。输入phpcs 回车开始安装操作。

安装完成后需要进行 phpcs配置 

[plain]  view plain  copy
  1. {  
  2.    
  3. // Path to php on windows installation  
  4. // This is needed as we cannot run phars on windows, so we run it through php  
  5. "phpcs_php_prefix_path": "D:\\phpStudy\\php55n\\php.exe",  
  6.    
  7. // This is the path to the bat file when we installed PHP_CodeSniffer  
  8. "phpcs_executable_path": "D:\\phpStudy\\php55n\\phpcs.bat",  
  9.    
  10. // PHP-CS-Fixer settings  
  11. // Don't want to auto fix issue with php-cs-fixer  
  12. "php_cs_fixer_on_save": false,  
  13.    
  14. // Show the quick panel  
  15. "php_cs_fixer_show_quick_panel": true,  
  16.    
  17. // The fixer phar file is stored here:  
  18. "php_cs_fixer_executable_path": "D:\\phpStudy\\php55n\\php-cs-fixer.phar",  
  19.    
  20. // PHP Linter settings  
  21. // Yes, lets lint the files  
  22. "phpcs_linter_run": true,  
  23.    
  24. // And execute that on each file when saved (php only as per extensions_to_execute)  
  25. "phpcs_linter_command_on_save": true,  
  26.    
  27. // Path to php  
  28. "phpcs_php_path": "D:\\phpStudy\\php55n\\php.exe",  
  29.    
  30. // This is the regex format of the errors  
  31. "phpcs_linter_regex": "(?P<message>.*) on line (?P<line>\\d+)",  
  32.    
  33.    
  34. // PHP Mess Detector settings  
  35. // Not turning on the mess detector here  
  36. "phpmd_run": false,  
  37. "phpmd_command_on_save": false,  
  38. "phpmd_executable_path": "",  
  39. "phpmd_additional_args": {}  
  40. }  
配置完成后。重新打开 sublimt ide 即可。


php-cs-fixer.phar
phpcs.bat

这些文件安装 php_codesniffer 即可得到。

http://pear.php.net/package/PHP_CodeSniffer/


文章转载自:http://blog.csdn.net/liangguangchuan/article/details/51518489

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值