From f17b74679ffef9658e1a67fa280fe233c80aa378 Mon Sep 17 00:00:00 2001 From: tsjordan-eng <55999897+tsjordan-eng@users.noreply.github.com> Date: Thu, 6 Aug 2020 13:50:44 -0600 Subject: fix cppcheck for 1.89+, and add column support (#3030) * fix cppcheck for 1.89+, and add column support In cppcheck 1.89 the output changed to be more like GCC. This commit forces any version of cppcheck to output in that same format. This also allows for ALE to pick up the linter's column information * Add parameters to tests. Vader passes. * Fix c cppcheck for v1.89 --- ale_linters/c/cppcheck.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ale_linters/c/cppcheck.vim') diff --git a/ale_linters/c/cppcheck.vim b/ale_linters/c/cppcheck.vim index 309b2851..b671fc8b 100644 --- a/ale_linters/c/cppcheck.vim +++ b/ale_linters/c/cppcheck.vim @@ -10,9 +10,11 @@ function! ale_linters#c#cppcheck#GetCommand(buffer) abort let l:buffer_path_include = empty(l:compile_commands_option) \ ? ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer) \ : '' + let l:template = ' --template=''{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}''' return l:cd_command \ . '%e -q --language=c' + \ . l:template \ . ale#Pad(l:compile_commands_option) \ . ale#Pad(ale#Var(a:buffer, 'c_cppcheck_options')) \ . l:buffer_path_include -- cgit v1.2.3