Close #2359 - Find compile_commands.json in build dirs for cppcheck

This commit is contained in:
w0rp
2019-05-20 22:08:03 +01:00
parent 937138dad4
commit 28819eedd3
5 changed files with 41 additions and 23 deletions

View File

@@ -21,4 +21,16 @@ Execute(cppcheck for C++ should detect compile_commands.json files):
AssertLinter 'cppcheck',
\ ale#path#CdString(ale#path#Simplify(g:dir . '/cppcheck_paths/one'))
\ . ale#Escape('cppcheck')
\ . ' -q --language=c --project=compile_commands.json --enable=style %t'
\ . ' -q --language=c'
\ . ' --project=' . ale#Escape('compile_commands.json')
\ . ' --enable=style %t'
Execute(cppcheck for C++ should detect compile_commands.json files in build directories):
call ale#test#SetFilename('cppcheck_paths/with_build_dir/foo.cpp')
AssertLinter 'cppcheck',
\ ale#path#CdString(ale#path#Simplify(g:dir . '/cppcheck_paths/with_build_dir'))
\ . ale#Escape('cppcheck')
\ . ' -q --language=c'
\ . ' --project=' . ale#Escape(ale#path#Simplify('build/compile_commands.json'))
\ . ' --enable=style %t'