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/cpp/cppcheck.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ale_linters/cpp') diff --git a/ale_linters/cpp/cppcheck.vim b/ale_linters/cpp/cppcheck.vim index 7cd80dbc..2c832246 100644 --- a/ale_linters/cpp/cppcheck.vim +++ b/ale_linters/cpp/cppcheck.vim @@ -10,9 +10,11 @@ function! ale_linters#cpp#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, 'cpp_cppcheck_options')) \ . l:buffer_path_include -- cgit v1.2.3