From 28819eedd39f0746c94a1ec59ca3c089e35971a5 Mon Sep 17 00:00:00 2001 From: w0rp Date: Mon, 20 May 2019 22:08:03 +0100 Subject: Close #2359 - Find compile_commands.json in build dirs for cppcheck --- .../test_c_cppcheck_command_callbacks.vader | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test/command_callback/test_c_cppcheck_command_callbacks.vader') diff --git a/test/command_callback/test_c_cppcheck_command_callbacks.vader b/test/command_callback/test_c_cppcheck_command_callbacks.vader index 3ae4bdbe..8e11ef2d 100644 --- a/test/command_callback/test_c_cppcheck_command_callbacks.vader +++ b/test/command_callback/test_c_cppcheck_command_callbacks.vader @@ -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' -- cgit v1.2.3