summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkodemeister <kodemeister@outlook.com>2018-08-09 09:06:30 +0600
committerkodemeister <kodemeister@outlook.com>2018-08-09 09:06:30 +0600
commit0702e4699e3af612737a0a7a9e6c61726f1c9237 (patch)
treecb78cc5a8e971c4b19871fabb121f0986bd55a7d
parentcc84c19451e3aa57eb45966b37f114a2c5941aab (diff)
downloadale-0702e4699e3af612737a0a7a9e6c61726f1c9237.zip
Add blank lines to conform the coding standards
-rw-r--r--ale_linters/c/cquery.vim2
-rw-r--r--ale_linters/cpp/cquery.vim2
2 files changed, 4 insertions, 0 deletions
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