How can I reuse the HTMLdiagnostics of StaticAnalysis out-of-tree?

Hi,

I have write a out-of-tree pass, and want to use the HTMLdiagnostics of StaticAnalysis to generate diagnostics.
Or…can I integrate my pass into StaticAnalysis?
Thanks for any help!

The Static Analyzer uses HTMLRewrite from libRewrite for this purpose, there's a high chance it's all you need.