2017-02-11 23:45:06 +00:00
|
|
|
" Author: vdeurzen <tim@kompiler.org>, w0rp <devw0rp@gmail.com>
|
2017-02-11 23:32:56 +00:00
|
|
|
" Description: clang-tidy linter for cpp files
|
|
|
|
|
|
|
|
" Set this option to change the clang-tidy options for warnings for C.
|
2017-02-11 23:45:06 +00: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 23:32:56 +00:00
|
|
|
|
|
|
|
call ale#linter#Define('cpp', {
|
|
|
|
\ 'name': 'clangtidy',
|
|
|
|
\ 'output_stream': 'stdout',
|
|
|
|
\ 'executable': 'clang-tidy',
|
2017-02-11 23:45:06 +00:00
|
|
|
\ 'command_callback': 'ale_linters#cpp#clangtidy#GetCommand',
|
2017-04-11 19:32:57 +00:00
|
|
|
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
|
2017-02-11 23:32:56 +00:00
|
|
|
\})
|