mirror of
https://github.com/dense-analysis/ale.git
synced 2026-10-16 02:51:30 +08:00
Add cppcheck handler match on misra msg (#3980)
Co-authored-by: Dan George <dgeorge@anduril.com>
This commit is contained in:
1 parent
1e0e76bf96
commit
d72a9d64ff
2 files changed
+23
-1
No files matched your search
@@ -50,7 +50,12 @@ function! ale#handlers#cppcheck#HandleCppCheckFormat(buffer, lines) abort
|
||||
"test.cpp:974:{column}: error:{inconclusive:inconclusive} Array 'n[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds]\
|
||||
" n[3]=3;
|
||||
" ^
|
||||
let l:pattern = '\v(\f+):(\d+):(\d+|\{column\}): (\w+):(\{inconclusive:inconclusive\})? ?(.*) \[(\w+)\]\'
|
||||
"
|
||||
"" OR if using the misra addon:
|
||||
"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:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
|
||||
Reference in new issue
Block a user