mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-10 06:21:53 +08:00
Add cppcheck handler match on misra msg (#3980)
Co-authored-by: Dan George <dgeorge@anduril.com>
This commit is contained in:
@@ -63,6 +63,23 @@ Execute(Basic errors should be handled by cppcheck):
|
||||
\ ' ^',
|
||||
\ ])
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 1,
|
||||
\ 'col' : 16,
|
||||
\ 'type': 'W',
|
||||
\ 'sub_type': 'style',
|
||||
\ 'text': 'misra violation (use --rule-texts=<file> to get proper output)',
|
||||
\ 'code': 'misra-c2012-2.7'
|
||||
\ },
|
||||
\ ],
|
||||
\ ale#handlers#cppcheck#HandleCppCheckFormat(bufnr(''), [
|
||||
\ 'test.cpp:1:16: style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-2.7]\',
|
||||
\ 'void test( int parm ) {}',
|
||||
\ ' ^',
|
||||
\ ])
|
||||
|
||||
Execute(Problems from other files should be ignored by cppcheck):
|
||||
call ale#test#SetFilename('test.cpp')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user