0

这是我当前的合成配置:

let g:syntastic_check_on_open=1
let g:syntastic_quiet_messages = { "level": [] }
let g:syntastic_aggregate_errors = 1
let g:syntastic_javascript_checkers = ['jshint', 'jslint']
let g:syntastic_warning_symbol = 'WW'
let g:syntastic_error_symbol = 'EE'

我遇到的问题是,它仅在我的 javascript 文件中显示错误消息:

例如:

% jslint web/js/app.js

web/js/app.js
 #1 'define' was used before it was defined.
    define([ // Line 1, Pos 1
 #2 Expected exactly one space between 'function' and '('.
    RestangularProvider.setResponseExtractor(function(response, operation) { // Line 73, Pos 58

但是当我在 vim 中打开文件时,我只看到消息#1 'define' was used before it was defined.,而不是第二个。

我应该怎么做才能也显示警告?

4

1 回答 1

2

Syntastic 默认使用以下命令行选项jslint

--white --nomen --regexp --plusplus --bitwise --newcap --sloppy --vars

(见syntastic/syntax_checkers/javascript/jslint.vim)。您可以通过以下方式设置自己的选项

let g:syntastic_javscript_jslint_args = "--foo --bar --baz"

--white默认值是抑制第二个警告的原因

于 2014-09-19T15:15:30.997 回答