I am using cpptyle within eclipse to check my code style within my C-Project. So my file extensions are *.c and *.h.
cppstyle uses cpplint.py. The documentation of cpplint.py tells, that you have to use the extension parameter if you would like to check files, which do not have the extension cc
, h
, cpp
, cu
or cuh
.
So in the commandline I use cpplint in this way:
cpplint.py –extensions=h,c src/*
Well, regarding to the documentation of cppstyle, it is not possible to pass any parameters to cpplint.py. The only way to configure cpplint.py is to use those CPPLINT.cfg files, which sadly do not support the extension parameter.
So finally it is not possible to check *.c files within eclipse.
How to force cppstyle to use c and h files?