From 0702e4699e3af612737a0a7a9e6c61726f1c9237 Mon Sep 17 00:00:00 2001 From: kodemeister Date: Thu, 9 Aug 2018 09:06:30 +0600 Subject: Add blank lines to conform the coding standards --- ale_linters/c/cquery.vim | 2 ++ ale_linters/cpp/cquery.vim | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ale_linters/c/cquery.vim b/ale_linters/c/cquery.vim index 225fda57..a20782a2 100644 --- a/ale_linters/c/cquery.vim +++ b/ale_linters/c/cquery.vim @@ -6,9 +6,11 @@ call ale#Set('c_cquery_cache_directory', expand('~/.cache/cquery')) function! ale_linters#c#cquery#GetProjectRoot(buffer) abort let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') + if empty(l:project_root) let l:project_root = ale#path#FindNearestFile(a:buffer, '.cquery') endif + return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' endfunction diff --git a/ale_linters/cpp/cquery.vim b/ale_linters/cpp/cquery.vim index 7318da40..b1c81989 100644 --- a/ale_linters/cpp/cquery.vim +++ b/ale_linters/cpp/cquery.vim @@ -6,9 +6,11 @@ call ale#Set('cpp_cquery_cache_directory', expand('~/.cache/cquery')) function! ale_linters#cpp#cquery#GetProjectRoot(buffer) abort let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json') + if empty(l:project_root) let l:project_root = ale#path#FindNearestFile(a:buffer, '.cquery') endif + return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : '' endfunction -- cgit v1.2.3