admin管理员组文章数量:1388072
Has anyone gotten the Google Closure Linter (gjslint) to work with Sublime Text 2 for Windows?
When I run it I get the following (via Tools menu or CTRL+SHIFT+J):
The filename, directory name, or volume label syntax is incorrect.
closure linter: ignored 0 errors.
My steps were as follows:
- Installed Python 2.7
- Installed Setup Tools for Easy Install
- Installed the Closure Linter
- Installed the ST2 Plugin
Out of the box, none of the features worked. However if I hard-code the path in the Default Settings I can get the fixjsstyle plugin to work:
{
// Path to the gjslint.
"gjslint_path": "/python27/scripts/gjslint",
// Path to the fixjsstyle.
"fixjsstyle_path": "/python27/scripts/fixjsstyle"
}
Can confirm they both exist:
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
It certainly sounds like a reference problem, I even tried copying the executables to the plugin directory, that didn't work either.
Edit: I should add that I did turn on the debug: true
flag and nothing came up.
Has anyone gotten the Google Closure Linter (gjslint) to work with Sublime Text 2 for Windows?
When I run it I get the following (via Tools menu or CTRL+SHIFT+J):
The filename, directory name, or volume label syntax is incorrect.
closure linter: ignored 0 errors.
My steps were as follows:
- Installed Python 2.7
- Installed Setup Tools for Easy Install
- Installed the Closure Linter
- Installed the ST2 Plugin
Out of the box, none of the features worked. However if I hard-code the path in the Default Settings I can get the fixjsstyle plugin to work:
{
// Path to the gjslint.
"gjslint_path": "/python27/scripts/gjslint",
// Path to the fixjsstyle.
"fixjsstyle_path": "/python27/scripts/fixjsstyle"
}
Can confirm they both exist:
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
It certainly sounds like a reference problem, I even tried copying the executables to the plugin directory, that didn't work either.
Edit: I should add that I did turn on the debug: true
flag and nothing came up.
1 Answer
Reset to default 9I had the same issue on Windows 7.
The only way i found to fix it was to remove the double quotes around the gjslint
call
line 34 of gjslint.py
inside the sublime
package
original (not working):
cmd = '"' + s.get('gjslint_path', 'jslint') + '" ' + s.get('gjslint_flags', '') + ' "' + file_path + '"'
working :
cmd = '' + s.get('gjslint_path', 'jslint') + ' ' + s.get('gjslint_flags', '') + ' "' + file_path + '"'
Please make sure your gjslint
path has not any spaces to make this work as it's the case for you.
If somebody has another solution, please share.
本文标签: javascriptGoogle Closure Linter not working in Sublime Text 2 for WindowsStack Overflow
版权声明:本文标题:javascript - Google Closure Linter not working in Sublime Text 2 for Windows - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744501313a2609340.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论