mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-13 13:42:10 +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'
|
||||
|
||||
if filereadable(l:json_file)
|
||||
" Use the parent of the build dir for absolute
|
||||
" paths, otherwise use the path found by searching
|
||||
" upwards from the file.
|
||||
" For absolute build dir paths, use the parent
|
||||
" of the build dir as the project root. For
|
||||
" relative paths, use the directory found by
|
||||
" searching upwards from the file.
|
||||
let l:root = ale#path#IsAbsolute(l:dirname)
|
||||
\ ? fnamemodify(l:c_build_dir, ':h')
|
||||
\ : l:path
|
||||
|
||||
Reference in New Issue
Block a user