Fix #2421 - Use compile_commands.json in build dirs to find roots

This commit is contained in:
w0rp
2019-05-20 19:57:08 +01:00
parent 781bf1502f
commit 143af2b9fd
15 changed files with 78 additions and 78 deletions

View File

@@ -7,9 +7,9 @@ After:
Execute(The project root should be detected correctly using compile_commands.json file):
AssertLSPProject ''
call ale#test#SetFilename('cquery_paths/with_compile_commands_json/dummy.c')
call ale#test#SetFilename('cquery_paths/dummy.c')
AssertLSPProject ale#path#Simplify(g:dir . '/cquery_paths/with_compile_commands_json')
AssertLSPProject ale#path#Simplify(g:dir . '/cquery_paths')
Execute(The project root should be detected correctly using .cquery file):
AssertLSPProject ''

View File

@@ -2,6 +2,7 @@ Before:
" Make sure the c.vim file is loaded first.
call ale#c#FindProjectRoot(bufnr(''))
Save g:ale_c_parse_compile_commands
Save g:ale_c_parse_makefile
Save g:__ale_c_project_filenames
@@ -14,6 +15,7 @@ Before:
\ 'v:val isnot# ''.git/HEAD'''
\)
let g:ale_c_parse_compile_commands = 0
let g:ale_c_parse_makefile = 0
After:

View File

@@ -10,9 +10,9 @@ After:
Execute(The project root should be detected correctly using compile_commands.json file):
AssertLSPProject ''
call ale#test#SetFilename('cquery_paths/with_compile_commands_json/dummy.cpp')
call ale#test#SetFilename('cquery_paths/dummy.cpp')
AssertLSPProject ale#path#Simplify(g:dir . '/cquery_paths/with_compile_commands_json')
AssertLSPProject ale#path#Simplify(g:dir . '/cquery_paths')
Execute(The project root should be detected correctly using .cquery file):
AssertLSPProject ''