Add clang-tidy linter for cpp. (#275)
* Add clang-tidy linter for cpp. * Use stdin-wrapper to allow linting as you type.
This commit is contained in:
parent
4a71638061
commit
355608b031
15
ale_linters/cpp/clangtidy.vim
Normal file
15
ale_linters/cpp/clangtidy.vim
Normal file
@ -0,0 +1,15 @@
|
||||
" Author: vdeurzen <tim@kompiler.org>
|
||||
" Description: clang-tidy linter for cpp files
|
||||
|
||||
" Set this option to change the clang-tidy options for warnings for C.
|
||||
if !exists('g:ale_cpp_clangtidy_options')
|
||||
let g:ale_cpp_clangtidy_options = '-std=c++14 -Wall'
|
||||
endif
|
||||
|
||||
call ale#linter#Define('cpp', {
|
||||
\ 'name': 'clangtidy',
|
||||
\ 'output_stream': 'stdout',
|
||||
\ 'executable': 'clang-tidy',
|
||||
\ 'command': g:ale#util#stdin_wrapper . ' -- ' . g:ale_cpp_clangtidy_options,
|
||||
\ 'callback': 'ale#handlers#HandleGCCFormat',
|
||||
\})
|
Loading…
Reference in New Issue
Block a user