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:
@@ -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(''))
|
||||
|
||||
0
test/test_c_projects/build/compile_commands.json
Normal file
0
test/test_c_projects/build/compile_commands.json
Normal file
0
test/test_c_projects/json_project/include/test.h
Normal file
0
test/test_c_projects/json_project/include/test.h
Normal file
0
test/test_c_projects/json_project/subdir/dummy
Normal file
0
test/test_c_projects/json_project/subdir/dummy
Normal file
Reference in New Issue
Block a user