Support older versions of Vint

This commit is contained in:
w0rp 2017-03-11 19:45:33 +00:00
parent 892fff03cc
commit ca78e4c150
1 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,8 @@ 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:vint_version = ale#semver#Parse(system('vint --version'))
let s:has_no_color_support = ale#semver#GreaterOrEqual(s:vint_version, [3, 0, 7])
let s:enable_neovim = has('nvim') ? ' --enable-neovim ' : ''
let s:format = '-f "{file_path}:{line_number}:{column_number}: {severity}: {description} (see {reference})"'
@ -13,8 +15,8 @@ call ale#linter#Define('vim', {
\ 'name': 'vint',
\ 'executable': 'vint',
\ 'command': 'vint '
\ . s:warning_flag
\ . ' --no-color '
\ . s:warning_flag . ' '
\ . (s:has_no_color_support ? '--no-color ' : '')
\ . s:enable_neovim
\ . s:format
\ . ' %t',