Set an option for turning Vint style issues on or off.

This commit is contained in:
w0rp
2016-10-11 13:20:56 +01:00
parent 0fa730aecf
commit 38dcf30045
2 changed files with 34 additions and 11 deletions

View File

@@ -7,11 +7,20 @@ endif
let g:loaded_ale_linters_vim_vint = 1
" This flag can be used to change enable/disable style issues.
let g:ale_vim_vint_show_style_issues =
\ get(g:, 'ale_vim_vint_show_style_issues', 1)
let s:warning_flag = g:ale_vim_vint_show_style_issues ? '-s' : '-w'
let s:format = '-f "{file_path}:{line_number}:{column_number}: {severity}: {description} (see {reference})"'
call ale#linter#Define('vim', {
\ 'name': 'vint',
\ 'executable': 'vint',
\ 'command': g:ale#util#stdin_wrapper . ' .vim vint -w --no-color ' . s:format,
\ 'command': g:ale#util#stdin_wrapper
\ . ' .vim vint '
\ . s:warning_flag
\ . ' --no-color '
\ . s:format,
\ 'callback': 'ale#handlers#HandleGCCFormat',
\})