diff options
author | tsjordan-eng <55999897+tsjordan-eng@users.noreply.github.com> | 2020-08-06 13:50:44 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-06 20:50:44 +0100 |
commit | f17b74679ffef9658e1a67fa280fe233c80aa378 (patch) | |
tree | 299273ff19c8239ae0c0cb56ba1299277908c3e7 /ale_linters/c/cppcheck.vim | |
parent | 40441960477e4ca0028eb287dfe25c4c1dea8a27 (diff) | |
download | ale-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/c/cppcheck.vim')
-rw-r--r-- | ale_linters/c/cppcheck.vim | 2 |
1 files changed, 2 insertions, 0 deletions
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 |