mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Fix #2421 - Use compile_commands.json in build dirs to find roots
This commit is contained in:
@@ -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 ''
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 ''
|
||||
|
||||
Reference in New Issue
Block a user