diff options
author | w0rp <devw0rp@gmail.com> | 2021-03-01 20:11:10 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2021-03-01 20:11:10 +0000 |
commit | 9fe7b1fe6a23fb55e6d782293585d58193123f59 (patch) | |
tree | 0403deb70011aee7be08e586b10b5828cf69499e /test/command_callback/test_cpp_cppcheck_command_callbacks.vader | |
parent | 48fab99a0ab793e1b9607795c21659f12bd6947f (diff) | |
download | ale-9fe7b1fe6a23fb55e6d782293585d58193123f59.zip |
Close #2281 - Separate cwd commands from commands
Working directories are now set seperately from the commands so they
can later be swapped out when running linters over projects is
supported, and also better support filename mapping for running linters
on other machines in future.
Diffstat (limited to 'test/command_callback/test_cpp_cppcheck_command_callbacks.vader')
-rw-r--r-- | test/command_callback/test_cpp_cppcheck_command_callbacks.vader | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/test/command_callback/test_cpp_cppcheck_command_callbacks.vader b/test/command_callback/test_cpp_cppcheck_command_callbacks.vader index 7eea4a69..01e4f776 100644 --- a/test/command_callback/test_cpp_cppcheck_command_callbacks.vader +++ b/test/command_callback/test_cpp_cppcheck_command_callbacks.vader @@ -17,14 +17,14 @@ Execute(The executable should be configurable): let b:ale_cpp_cppcheck_executable = 'foobar' + AssertLinterCwd '' AssertLinter 'foobar', ale#Escape('foobar') . b:command_tail Execute(cppcheck for C++ should detect compile_commands.json files): call ale#test#SetFilename('cppcheck_paths/one/foo.cpp') - AssertLinter 'cppcheck', - \ ale#path#CdString(ale#path#Simplify(g:dir . '/cppcheck_paths/one')) - \ . ale#Escape('cppcheck') + AssertLinterCwd ale#path#Simplify(g:dir . '/cppcheck_paths/one') + AssertLinter 'cppcheck', ale#Escape('cppcheck') \ . ' -q --language=c++' \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') \ . ' --project=' . ale#Escape('compile_commands.json') @@ -33,9 +33,8 @@ Execute(cppcheck for C++ should detect compile_commands.json files): 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') + AssertLinterCwd ale#path#Simplify(g:dir . '/cppcheck_paths/with_build_dir') + AssertLinter 'cppcheck', ale#Escape('cppcheck') \ . ' -q --language=c++' \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') \ . ' --project=' . ale#Escape(ale#path#Simplify('build/compile_commands.json')) @@ -58,9 +57,8 @@ Execute(cppcheck for C++ should ignore compile_commands.json file if buffer is m set buftype= set modified - AssertLinter 'cppcheck', - \ ale#path#CdString(ale#path#Simplify(g:dir . '/cppcheck_paths/one')) - \ . ale#Escape('cppcheck') + AssertLinterCwd ale#path#Simplify(g:dir . '/cppcheck_paths/one') + AssertLinter 'cppcheck', ale#Escape('cppcheck') \ . ' -q --language=c++' \ . ' --template=' . ale#Escape('{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}') \ . ' --enable=style' |