Is it possible to choose which Doxygen warning to show?
Doxygen shows a Compound ? is not documented.
warning when buildi开发者_StackOverflow中文版ng. For a specific project I don't want to document Compounds. To remove clutter I want to see all other warnings except that one. Is there a way to clean the Doxygen output?
I don't think this is possible, except by writing your own post-processor to filter doxygen output. In your case, this should not be too hard, a simple grep
should be sufficient:
doxygen <config_file> | grep -v "warning: Compound .* is not documented"
I'm not really sure why doxygen does not provide this feature: perhaps it would require too much options, or more complicated options. Another possibility is that they assumed that since you want to be warned when something is not documented, there should be no exceptions except when explicitly specified in the source code (using \cond
and \endcond
, for example), with the rationale that this kind of omission should only be decided on a case-by-case basis. Or perhaps nobody ever asked them to include this feature: feel free to fill in a feature request.
I think what you're looking for is the if
, ifnot
and endif
commands. Just decide an appropriate label then use the correct tag. Ex.:
/*
* \if DISPLAY_COMPOUND
* Compound doc.
* ...
* \endif
*/
doxygen will evaluate if it knows of this label and if it doesn't, he'll ignore any comment up to the \endif
command in the same comment block
Then you need to define (or not) that label in your doxyfile in the ENABLED_SECTIONS.
#comment the next line if you don't want to document Compound
ENABLED_SECTIONS = DISPLAY_COMPOUND
Have a look at the \cond
and \endcond
commands too which are similar but not quite the same (they enable or disable entire sections of a file, not just a single comment block).
You can switch off warnings in the doxygen configuration. See here: doxygen documenation
My favorite is: WARN_IF_UNDOCUMENTED = NO
精彩评论