Using Clang static analysis plugins with Clang-tidy

Is it currently possible to use Clang static analysis plugins and dynamically loaded checkers with Clang-tidy? I’m attempting to setup a build system for a new project that will run the Clang-tidy checkers, the static analysis checkers, and one or more custom checkers all at once (for example the custom checker described at Running additional clang tools, like modernize, would also be helpful. I found a thread on Phabricator that seems relevant (, but I couldn’t tell if the patches and changes discussed ever made it into a released version of Clang-tidy.

I’m currently using the pre-compiled 3.7.0 version included in Ubuntu 15.10. However, I have no problem updating or compiling from source as long as the required features are integrated within the next stable release.

Ideally, I would be able to write a simple script similar to the pseudo-code below. While it wouldn’t be my first choice, I’m willing to write a small utility to accomplish this goal if dynamically loading plugins is only possible when directly using one or more Clang shared libraries. Lastly, right now, I’m not looking to modify Clang source or directly integrate new checkers into the Clang source.

make clean

bear make
for_each(source in SOURCES){

clang-tidy -load-plugins “” -Checkers=“…” ${source}


On a slightly different note, is it possible to use clang-tidy in a similar manner to scan-build, where you can process all source files with a single simple command (e.g., scan-build make).

Thank you,