aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoryoan6672025-12-21 04:56:23 +0100
committerGitHub2025-12-21 12:56:23 +0900
commit710e1aac9c63ab378c497e9bdc6a8a13342d6dd8 (patch)
treedd1581a5749a38286497b7add4c5469eaaea690d
parent281eb4808c57f42073e491c1e6891973ea5a07e8 (diff)
downloadale-710e1aac9c63ab378c497e9bdc6a8a13342d6dd8.tar.gz

fix linter cppcheck (#5071)

-rw-r--r--autoload/ale/handlers/cppcheck.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/autoload/ale/handlers/cppcheck.vim b/autoload/ale/handlers/cppcheck.vim
index 150bb0074..94134a5ec 100644
--- a/autoload/ale/handlers/cppcheck.vim
+++ b/autoload/ale/handlers/cppcheck.vim
@@ -69,11 +69,12 @@ function! ale#handlers#cppcheck#HandleCppCheckFormat(buffer, lines) abort
"test.c:1:16: style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-2.7]\'
"void test( int parm ) {}
" ^
- let l:pattern = '\v(\f+):(\d+):(\d+|\{column\}): (\w+):(\{inconclusive:inconclusive\})? ?(.*) \[(%(\w[-.]?)+)\]\'
+ let l:pattern = '\v(\f+):(\d+):(\d+|\{column\}): (\w+):(\{inconclusive:inconclusive\})? ?(.*) \[(%(\w[-.]?)+)\]\\?'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
if ale#path#IsBufferPath(a:buffer, l:match[1])
+ let l:text = substitute(l:match[6], '\\$', '', '')
call add(l:output, {
\ 'lnum': str2nr(l:match[2]),
\ 'col': match(l:match[3],'{column}') >= 0 ? 1 : str2nr(l:match[3]),