Support older versions of Vint
This commit is contained in:
parent
892fff03cc
commit
ca78e4c150
@ -6,6 +6,8 @@ let g:ale_vim_vint_show_style_issues =
|
|||||||
\ get(g:, 'ale_vim_vint_show_style_issues', 1)
|
\ get(g:, 'ale_vim_vint_show_style_issues', 1)
|
||||||
|
|
||||||
let s:warning_flag = g:ale_vim_vint_show_style_issues ? '-s' : '-w'
|
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:enable_neovim = has('nvim') ? ' --enable-neovim ' : ''
|
||||||
let s:format = '-f "{file_path}:{line_number}:{column_number}: {severity}: {description} (see {reference})"'
|
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',
|
\ 'name': 'vint',
|
||||||
\ 'executable': 'vint',
|
\ 'executable': 'vint',
|
||||||
\ 'command': 'vint '
|
\ 'command': 'vint '
|
||||||
\ . s:warning_flag
|
\ . s:warning_flag . ' '
|
||||||
\ . ' --no-color '
|
\ . (s:has_no_color_support ? '--no-color ' : '')
|
||||||
\ . s:enable_neovim
|
\ . s:enable_neovim
|
||||||
\ . s:format
|
\ . s:format
|
||||||
\ . ' %t',
|
\ . ' %t',
|
||||||
|
Loading…
Reference in New Issue
Block a user