[英]SublimeLinter: WARNING: phpcs deactivated, cannot locate 'phpcs'
I've got a path problem. 我遇到了路径问题。 I am trying to setup SublimeText3 and WordPress Coding Standards.
我正在尝试设置SublimeText3和WordPress编码标准。 I'm working width XAMPP on a Mac.
我正在Mac上使用XAMPP。
My phpcs file is located in /Applications/XAMPP/xamppfiles/PHP_CodeSniffer/scripts/ 我的phpcs文件位于/ Applications / XAMPP / xamppfiles / PHP_CodeSniffer / scripts /
In the SublimeLinter user settings I put the path above: 在SublimeLinter用户设置中,我将路径放在上面:
"linters": {
"phpcs": {
"@disable": false,
"args": [],
"cmd": "/Applications/XAMPP/xamppfiles/PHP_CodeSniffer/scripts/phpcs",
"excludes": [],
"standard": "WordPress-VIP"
}
}
Unfortunately the editor can't locate phpcs: 不幸的是,编辑器找不到phpcs:
SublimeLinter: WARNING: phpcs deactivated, cannot locate 'phpcs'
Does someone know what my mistake is? 有人知道我的错误吗?
Regards! 问候!
Edit: 编辑:
"paths": {
"linux": [],
"osx": [
"/bin/bash"
],
"windows": []
}
Then I get this error: 然后我得到这个错误:
SublimeLinter: user shell: /bin/bash
SublimeLinter: computed PATH using /bin/bash:
/bin/bash
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
SublimeLinter: WARNING: phpcs deactivated, cannot locate 'phpcs'
Remove cmd
parameter. 删除
cmd
参数。
"linters": {
"phpcs": {
"@disable": false,
"args": [],
"excludes": [],
"standard": "WordPress-VIP"
}
}
Then add the path
to where the script exists. 然后将
path
添加到脚本所在的位置。
"paths": {
"linux": [],
"osx": [
"/Applications/XAMPP/xamppfiles/PHP_CodeSniffer/scripts"
],
"windows": []
}
You may need to restart Sublime Text. 您可能需要重新启动Sublime Text。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.