3

Wondering if it is possible to check C++ header files in vim with Syntastic running clang-tidy as checker?

:SyntasticCheck on .hpp files does nothing, though running the same command on the .cpp file that includes the header does check that header, but I'd rather check the header while I am editing it, not while I am editing the source file.

The gcc checker works on .hpp files, but clang tidy does not as far as I can tell. I am aware of the clang-tidy arg -header-filter, but I'm somewhat lost on how to use that, if it is even the right place.

relevant .vimrc:

let g:syntastic_cpp_checkers = ['clang_tidy'] 
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_auto_refresh_includes = 1
let g:syntastic_cpp_clang_tidy_args = '-checks=*'

0 Answers0