From a852c9e4fb914b621e1c48575721ec45c39a3d67 Mon Sep 17 00:00:00 2001 From: Yoan Gabriel Date: Tue, 2 Dec 2025 00:07:16 +0100 Subject: [PATCH] fix linter cppcheck --- autoload/ale/handlers/cppcheck.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/ale/handlers/cppcheck.vim b/autoload/ale/handlers/cppcheck.vim index 150bb0074a..94134a5ecb 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= 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]),