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

Ter*_*rry 7 javascript python google-closure-compiler sublimetext2

有没有人得到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"
}
Run Code Online (Sandbox Code Playgroud)

可以确认它们都存在:

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
Run Code Online (Sandbox Code Playgroud)

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

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

小智 9

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

线34gjslint.py内侧sublime

原始(不工作):

cmd = '"' + s.get('gjslint_path', 'jslint') + '" ' + s.get('gjslint_flags', '') + ' "' + file_path + '"'
Run Code Online (Sandbox Code Playgroud)

工作:

cmd = '' + s.get('gjslint_path', 'jslint') + ' ' + s.get('gjslint_flags', '') + ' "' + file_path + '"'
Run Code Online (Sandbox Code Playgroud)

请确保您的gjslint路径没有任何空间来完成这项工作,就像您的情况一样.

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