diff options
author | Dan George <dgeorge83616@yahoo.com> | 2021-11-15 03:34:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 20:34:46 +0900 |
commit | d72a9d64ff4f9ff7fef32d180363180abf4e1f0b (patch) | |
tree | a0c3bfb56dbf7f5e7c954f6d8ab8e4c1dad814c7 /autoload | |
parent | 1e0e76bf9619a3ce21663165283f9971556c95b3 (diff) | |
download | ale-d72a9d64ff4f9ff7fef32d180363180abf4e1f0b.zip |
Add cppcheck handler match on misra msg (#3980)
Co-authored-by: Dan George <dgeorge@anduril.com>
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/cppcheck.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/autoload/ale/handlers/cppcheck.vim b/autoload/ale/handlers/cppcheck.vim index a07d0aed..bb8c8602 100644 --- a/autoload/ale/handlers/cppcheck.vim +++ b/autoload/ale/handlers/cppcheck.vim @@ -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) |