Sublime Text 2 / sublimeLinter:只有Python是实时背景的



我已经花了几个小时了,进展不大。我正在运行Sublime Text 2.0.2和SublimeLinter v1.7 [1]。它可以很好地实时下载Python,但是对于常使用的许多其他语言[Javascript,Ruby,CSS/SCSS等],它只会在保存时通过控制台显示格式不正确的警告[2]。我已经尝试了许多可执行地图的设置。我目前有:

"sublimelinter_executable_map":
{    
    "javascript": "/usr/local/bin/node",
    "node": "/usr/local/bin/node"
},

我也只有"javascript":"/usr/local/bin/node"。我也尝试使用jshint和jslint作为"javascript_linter"选项。

控制台显示SublimeLinter加载和启用javascript,CSS和Ruby(分别使用node,ruby和node(。

在控制台上的启用消息之后,我得到:

Traceback (most recent call last):
  File "./SublimeLinter.py", line 431, in _update_view
  File "./SublimeLinter.py", line 143, in run_once
  File "./sublimelinter/modules/base_linter.py", line 291, in run
  File "./sublimelinter/modules/javascript.py", line 72, in parse_errors
ValueError: Error from jslint: util.puts: Use console.log instead

也:

SublimeLinter: css enabled (using node.js)
Traceback (most recent call last):
  File "./SublimeLinter.py", line 431, in _update_view
  File "./SublimeLinter.py", line 143, in run_once
  File "./sublimelinter/modules/base_linter.py", line 291, in run
  File "./sublimelinter/modules/css.py", line 24, in parse_errors
ValueError: Error from csslint: util.puts: Use console.log instead

接下来是原始 linting 消息,例如:

[{"id":"(error)","raw":"Use spaces, not tabs.","evidence":"t"published":     
"#444444",","line":4,"character":1,"reason":"Use spaces, not tabs."},{"id":"  
(error)","raw":"Expected '{a}' at column {b}, not column 
{c}.","evidence":"t"published": 

[1] 根据 https://github.com/SublimeLinter/SublimeLinter/issues/512 我回滚到 v1.7 以使 PEP8 linting 正常工作。

[2] Coffeescript 获得实时 linting,这很好。

显然这已经在Sublime 3中得到了修复:

https://github.com/SublimeLinter/SublimeLinter-for-ST2/issues/560

最新更新