#1635 - Use the project base rather than its parent for cquery

This commit is contained in:
Ben Falconer 2018-06-07 00:04:21 +01:00
parent 67753de531
commit d1be72f438

View File

@ -7,7 +7,7 @@ call ale#Set('cpp_cquery_cache_directory', expand('~/.cache/cquery'))
function! ale_linters#cpp#cquery#GetProjectRoot(buffer) abort function! ale_linters#cpp#cquery#GetProjectRoot(buffer) abort
let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
return !empty(l:project_root) ? fnamemodify(l:project_root, ':h:h') : '' return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endfunction endfunction
function! ale_linters#cpp#cquery#GetExecutable(buffer) abort function! ale_linters#cpp#cquery#GetExecutable(buffer) abort