Search code examples
c++doxygenmetrics

Generate metrics of project with Doxygen?


I currently use Doxygen to generate the documentation of my C++ projects. As Doxygen is great and generates a lot of information, I was wondering if there was a way to integrate metrics of the project in the generated documentation.

When I talk of metrics, I think of lines of code, number of classes, number of functions, cyclomatic complexity, etc.

Is there something to do that ?

If that's not possible directly, is there a way we can create a little plugin to Doxygen to add more informations to the generate documentation ?


Solution

  • I'd look into the XML output generated by doxygen which might have the information you need, although you may need to run doxygen again.

    You can add a preprocessor script prior to running doxygen that will generate the metrics for you and create a set of pages to display this information. (Look into the INPUT_FILTER option in the Doxyfile)

    I'd also post this question to doxygen-users@lists.sourceforge.net if you haven't already done so.