summaryrefslogtreecommitdiff
path: root/ale_linters/cpp
diff options
context:
space:
mode:
authortsjordan-eng <55999897+tsjordan-eng@users.noreply.github.com>2020-08-06 13:50:44 -0600
committerGitHub <noreply@github.com>2020-08-06 20:50:44 +0100
commitf17b74679ffef9658e1a67fa280fe233c80aa378 (patch)
tree299273ff19c8239ae0c0cb56ba1299277908c3e7 /ale_linters/cpp
parent40441960477e4ca0028eb287dfe25c4c1dea8a27 (diff)
downloadale-f17b74679ffef9658e1a67fa280fe233c80aa378.zip
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
Diffstat (limited to 'ale_linters/cpp')
-rw-r--r--ale_linters/cpp/cppcheck.vim2
1 files changed, 2 insertions, 0 deletions
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