diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-29 19:24:19 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-29 19:24:27 +0100 |
commit | ac4bac8ea4c5a8d520041ad509e10af454fcfce4 (patch) | |
tree | 87a57a03149b62116b8e1b6fa96117e5e3186626 /ale_linters/cpp/gcc.vim | |
parent | a7b8cb4fe32b43dbeeadc8cb94f378b4e2112723 (diff) | |
download | ale-ac4bac8ea4c5a8d520041ad509e10af454fcfce4.zip |
Add support for parsing compile_commands.json files for C compilers
Diffstat (limited to 'ale_linters/cpp/gcc.vim')
-rw-r--r-- | ale_linters/cpp/gcc.vim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ale_linters/cpp/gcc.vim b/ale_linters/cpp/gcc.vim index a663eaa3..242e389e 100644 --- a/ale_linters/cpp/gcc.vim +++ b/ale_linters/cpp/gcc.vim @@ -14,10 +14,10 @@ function! ale_linters#cpp#gcc#GetCommand(buffer, output) abort " -iquote with the directory the file is in makes #include work for " headers in the same directory. return ale#Escape(ale_linters#cpp#gcc#GetExecutable(a:buffer)) - \ . ' -S -x c++ -fsyntax-only ' - \ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' ' - \ . l:cflags - \ . ale#Var(a:buffer, 'cpp_gcc_options') . ' -' + \ . ' -S -x c++ -fsyntax-only' + \ . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) + \ . ale#Pad(l:cflags) + \ . ale#Pad(ale#Var(a:buffer, 'cpp_gcc_options')) . ' -' endfunction call ale#linter#Define('cpp', { |