mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-28 20:42:26 +08:00
Improve comment clarity in FindCompileCommands
Co-authored-by: w0rp <3518142+w0rp@users.noreply.github.com>
This commit is contained in:
@@ -253,9 +253,10 @@ function! ale#c#FindCompileCommands(buffer) abort
|
|||||||
let l:json_file = l:c_build_dir . s:sep . 'compile_commands.json'
|
let l:json_file = l:c_build_dir . s:sep . 'compile_commands.json'
|
||||||
|
|
||||||
if filereadable(l:json_file)
|
if filereadable(l:json_file)
|
||||||
" Use the parent of the build dir for absolute
|
" For absolute build dir paths, use the parent
|
||||||
" paths, otherwise use the path found by searching
|
" of the build dir as the project root. For
|
||||||
" upwards from the file.
|
" relative paths, use the directory found by
|
||||||
|
" searching upwards from the file.
|
||||||
let l:root = ale#path#IsAbsolute(l:dirname)
|
let l:root = ale#path#IsAbsolute(l:dirname)
|
||||||
\ ? fnamemodify(l:c_build_dir, ':h')
|
\ ? fnamemodify(l:c_build_dir, ':h')
|
||||||
\ : l:path
|
\ : l:path
|
||||||
|
|||||||
Reference in New Issue
Block a user