Google Closure Linter在Windows的Sublime Text 2中不起作用

2024-06-01 20:47:04 发布

您现在位置:Python中文网/ 问答频道 /正文

有人用Google的Closure Linter(gjslint)来处理Windows的Sublime text2吗?在

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

The filename, directory name, or volume label syntax is incorrect.

closure linter: ignored 0 errors.

我的步骤如下:

开箱即用,所有功能都不起作用。但是,如果我在默认设置中硬编码路径,我可以让fixjsstyle插件工作:

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

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

可以确认它们都存在:

^{pr2}$

这听起来像是一个引用问题,我甚至尝试将可执行文件复制到插件目录中,但也没用。在

Edit:我应该补充一下,我确实打开了debug: true标志,但没有出现任何问题。在


Tags: thetopath插件windowslintergooglescripts
1条回答
网友
1楼 · 发布于 2024-06-01 20:47:04

我在Windows7上也遇到过同样的问题。 我发现修复它的唯一方法是删除gjslint调用的双引号

sublime包内的gjslint.py的第34行

原始(不工作):

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

工作:

^{pr2}$

请确保您的gjslint路径没有任何空格来完成此操作,因为它适合您。在

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

相关问题 更多 >