2017-02-11 18:45:06 -05:00
|
|
|
" Author: vdeurzen <tim@kompiler.org>, w0rp <devw0rp@gmail.com>
|
2017-02-11 18:32:56 -05:00
|
|
|
" Description: clang-tidy linter for cpp files
|
|
|
|
|
|
|
|
" Set this option to change the clang-tidy options for warnings for C.
|
2017-02-11 18:45:06 -05:00
|
|
|
let g:ale_cpp_clangtidy_options =
|
|
|
|
\ get(g:, 'ale_cpp_clangtidy_options', '-std=c++14 -Wall')
|
|
|
|
|
|
|
|
function! ale_linters#cpp#clangtidy#GetCommand(buffer) abort
|
|
|
|
return 'clang-tidy %t -- ' . g:ale_cpp_clangtidy_options
|
|
|
|
endfunction
|
2017-02-11 18:32:56 -05:00
|
|
|
|
|
|
|
call ale#linter#Define('cpp', {
|
|
|
|
\ 'name': 'clangtidy',
|
|
|
|
\ 'output_stream': 'stdout',
|
|
|
|
\ 'executable': 'clang-tidy',
|
2017-02-11 18:45:06 -05:00
|
|
|
\ 'command_callback': 'ale_linters#cpp#clangtidy#GetCommand',
|
2017-02-11 18:32:56 -05:00
|
|
|
\ 'callback': 'ale#handlers#HandleGCCFormat',
|
|
|
|
\})
|