2017-07-16 21:11:43 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('cpp', 'cppcheck')
|
2017-07-16 21:11:43 +00:00
|
|
|
let b:command_tail = ' -q --language=c++ --enable=style %t'
|
|
|
|
|
|
|
|
After:
|
|
|
|
unlet! b:command_tail
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-07-16 21:11:43 +00:00
|
|
|
|
|
|
|
Execute(The executable should be configurable):
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'cppcheck', ale#Escape('cppcheck') . b:command_tail
|
2017-07-16 21:11:43 +00:00
|
|
|
|
|
|
|
let b:ale_cpp_cppcheck_executable = 'foobar'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'foobar', ale#Escape('foobar') . b:command_tail
|
2017-07-16 21:11:43 +00:00
|
|
|
|
|
|
|
Execute(cppcheck for C++ should detect compile_commands.json files):
|
|
|
|
call ale#test#SetFilename('cppcheck_paths/one/foo.cpp')
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'cppcheck',
|
2018-10-23 14:20:27 +00:00
|
|
|
\ ale#path#CdString(ale#path#Simplify(g:dir . '/cppcheck_paths/one'))
|
2017-07-16 21:11:43 +00:00
|
|
|
\ . ale#Escape('cppcheck')
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -q --language=c++ --project=compile_commands.json --enable=style %t'
|