Added builddir option to clang-tidy to point to json folder (#688)

Detect compille_commands.json files for clang-tidy
This commit is contained in:
Gagbo
2017-06-24 13:38:16 +02:00
committed by w0rp
parent 026c4f304e
commit e98560a349
9 changed files with 99 additions and 5 deletions

View File

@@ -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(''))