From 38dcf30045133b7154def9bad6a89a5d7258700d Mon Sep 17 00:00:00 2001 From: w0rp Date: Tue, 11 Oct 2016 13:20:56 +0100 Subject: Set an option for turning Vint style issues on or off. --- ale_linters/vim/vint.vim | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ale_linters') diff --git a/ale_linters/vim/vint.vim b/ale_linters/vim/vint.vim index e2c156f7..c23574ac 100644 --- a/ale_linters/vim/vint.vim +++ b/ale_linters/vim/vint.vim @@ -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', \}) -- cgit v1.2.3