<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>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 <a href="https://www.kdab.com/use-static-analysis-improve-performance">https://www.kdab.com/use-static-analysis-improve-performance</a>). Running additional clang tools, like modernize, would also be helpful. I found a thread on Phabricator that seems relevant (<a href="http://reviews.llvm.org/D9555#3f7f951f">http://reviews.llvm.org/D9555#3f7f951f</a>), but I couldn't tell if the patches and changes discussed ever made it into a released version of Clang-tidy.</div><div><br></div><div>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.</div><div><br></div><div>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.<br></div><div><br></div><div>make clean<br></div><div>bear make</div><div>for_each(source in SOURCES){<br></div><div> clang-tidy -load-plugins "<a href="http://MyPlugin.so">MyPlugin.so</a> <a href="http://MyOtherPlugin.so">MyOtherPlugin.so</a>" -Checkers="...." ${source}<br></div><div>}<br></div><div><br></div><div>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).<br></div><div><br></div><div>Thank you,</div><div>Sandy<br></div><div>---------------------------------</div><div>Sanford Freedman</div><div><a href="http://www.sanfordfreedman.com">www.sanfordfreedman.com</a></div></span></body></html>