diff options
author | Gagbo <Gagbo@users.noreply.github.com> | 2017-06-24 13:38:16 +0200 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-06-24 12:38:16 +0100 |
commit | e98560a349f3381c8fc6ecb6bf149c337dcf17be (patch) | |
tree | 7ad98b85b261aa3e085df5e7aaa558687c35955d /test | |
parent | 026c4f304ee69b81c80f9969c62353546c847c7a (diff) | |
download | ale-e98560a349f3381c8fc6ecb6bf149c337dcf17be.zip |
Added builddir option to clang-tidy to point to json folder (#688)
Detect compille_commands.json files for clang-tidy
Diffstat (limited to 'test')
-rw-r--r-- | test/test_c_import_paths.vader | 15 | ||||
-rw-r--r-- | test/test_c_projects/build/bad_folder_to_test_priority | 0 | ||||
-rw-r--r-- | test/test_c_projects/build/compile_commands.json | 0 | ||||
-rw-r--r-- | test/test_c_projects/json_project/build/compile_commands.json | 0 | ||||
-rw-r--r-- | test/test_c_projects/json_project/include/test.h | 0 | ||||
-rw-r--r-- | test/test_c_projects/json_project/subdir/dummy | 0 |
6 files changed, 15 insertions, 0 deletions
diff --git a/test/test_c_import_paths.vader b/test/test_c_import_paths.vader index 66ff6dca..b867100a 100644 --- a/test/test_c_import_paths.vader +++ b/test/test_c_import_paths.vader @@ -226,3 +226,18 @@ Execute(The C++ Clang handler should include root directories for projects with \ . ' -I' . ale#Escape(g:dir . '/test_c_projects/hpp_file_project') . ' ' \ . ' -' \ , ale_linters#cpp#clang#GetCommand(bufnr('')) + +Execute(The C++ ClangTidy handler should include json folders for projects with suitable build directory in them): + runtime! ale_linters/cpp/clangtidy.vim + + cd test_c_projects/json_project/subdir + silent noautocmd file file.cpp + + " TODO Test to move to C-family tools tests + " AssertEqual + " \ '/testplugin/test/test_c_projects/json_project/build' + " \ , ale#c#FindCompileCommands(bufnr('')) + + AssertEqual + \ 'clang-tidy -checks=''*'' %s -p ''/testplugin/test/test_c_projects/json_project/build''' + \ , ale_linters#cpp#clangtidy#GetCommand(bufnr('')) diff --git a/test/test_c_projects/build/bad_folder_to_test_priority b/test/test_c_projects/build/bad_folder_to_test_priority new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/test_c_projects/build/bad_folder_to_test_priority diff --git a/test/test_c_projects/build/compile_commands.json b/test/test_c_projects/build/compile_commands.json new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/test_c_projects/build/compile_commands.json diff --git a/test/test_c_projects/json_project/build/compile_commands.json b/test/test_c_projects/json_project/build/compile_commands.json new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/test_c_projects/json_project/build/compile_commands.json diff --git a/test/test_c_projects/json_project/include/test.h b/test/test_c_projects/json_project/include/test.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/test_c_projects/json_project/include/test.h diff --git a/test/test_c_projects/json_project/subdir/dummy b/test/test_c_projects/json_project/subdir/dummy new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/test_c_projects/json_project/subdir/dummy |