繁体   English   中英

Google Closure Linter无法在Sublime Text 2 for Windows中使用

[英]Google Closure Linter not working in Sublime Text 2 for Windows

有没有人得到Google Closure Linter( gjslint )与Sublime Text 2 for Windows一起使用?

当我运行它时,我得到以下内容(通过工具菜单或CTRL + SHIFT + J):

文件名,目录名或卷标语法不正确。

closure linter:忽略0错误。

我的步骤如下:

开箱即用,没有任何功能。 但是,如果我在默认设置中对路径进行硬编码,我可以使用fixjsstyle插件:

{
    // Path to the gjslint.
    "gjslint_path": "/python27/scripts/gjslint",

    // Path to the fixjsstyle.
    "fixjsstyle_path": "/python27/scripts/fixjsstyle"
}

可以确认它们都存在:

C:\>dir c:\python27\scripts
 Volume in drive C is OSDisk
 Volume Serial Number is 36E3-7433

 Directory of c:\python27\scripts

...
06/29/2012  09:48 AM               304 fixjsstyle-script.py
06/29/2012  09:48 AM             7,168 fixjsstyle.exe
06/29/2012  09:48 AM               525 fixjsstyle.exe.manifest
06/29/2012  09:48 AM               298 gjslint-script.py
06/29/2012  09:48 AM             7,168 gjslint.exe
06/29/2012  09:48 AM               522 gjslint.exe.manifest
              17 File(s)         34,580 bytes
               2 Dir(s)  186,377,805,824 bytes free

它当然听起来像一个参考问题,我甚至尝试将可执行文件复制到插件目录,这也无效。

编辑 :我应该补充一点,我确实打开了debug: true标志,没有出现任何问题。

我在Windows 7上遇到了同样的问题。我发现修复它的唯一方法是删除gjslint调用周围的双引号

sublime包中的gjslint.py 第34行

原始(不工作):

cmd = '"' + s.get('gjslint_path', 'jslint') + '" ' + s.get('gjslint_flags', '') + ' "' + file_path + '"'

工作:

cmd = '' + s.get('gjslint_path', 'jslint') + ' ' + s.get('gjslint_flags', '') + ' "' + file_path + '"'

请确保您的gjslint路径没有任何空格来使其正常工作,就像您的情况一样。

如果有人有其他解决方案,请分享。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM