First, I'm not asking how to include includes in a syntastic check. I already have:
let g:syntastic_c_check_header = 1
And when I run :SyntasticCheck
, or save, a .cpp
file, it also checks relevant includes if they are in syntastic_c_include_dirs
. It even opens an error location_list window in the buffer containing the .hpp
if I then jump to it.
That's great, but what it won't do is check the header directly, whether I save it or use :SyntasticCheck
in the .hpp
buffer.
This means when working on template classes made only of an .hpp
, I have to load some file that uses it and run the check from there; sometimes the easiest way to do this is to just create a dummy .cpp
file with one line in it (#include "foo.hpp"
). But this is still stupid and annoying.
Is anyone aware of a way to get Syntastic to check a C++ header directly, without having to run a check on file which uses the header?
g:syntastic_cpp_check_header
to 1 instead ofg:syntastic_c_check_header
? – lcd047 Sep 26 '16 at 14:27