I am trying to run chekstyle on all of my files within a project. So I have model, view, and controller folders all with their subfolders of .h and .cpp files. Is there any way to grab all the files that end in .h or .cpp without having to individually specify the folders I want to check? Right now my command is something like: CppCheckStyle inc/.h src/.cpp, etc,etc...but I'd rather skip the hassle of specifying all of the folder names.

Thanks!

I think find might work in this instance.
find -name "*.h" -exec CppCheckStyle {} \; -o -name "*.cpp" -exec CppCheckStyle {} \;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.