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