Search code examples
documentationwarningsdoxygen

Doxygen : Display warning for undocumented method


I've activated warnings with Doxygen

WARNINGS              = YES
WARN_IF_UNDOCUMENTED  = YES
WARN_IF_DOC_ERROR     = YES
WARN_NO_PARAMDOC      = YES

But undocumented methods like this one:

void AnimationManager::setAnimationTimeStep( double timeStep )
{
    ...
}

This does not throw any warning during the Doxygen generation.

Is there a way to display a warning in this situation?

Same problem with undocumented returns, for example:

/**
 * @brief brief description
 */
bool AnimationManager::hasAnimationTimeStep()
{
    ...
}

This does not throw a warning for the undocumented return.


Solution

  • When you are missing warnings that you would otherwise expect, check whether EXTRACT_ALL is set to YES.

    From the commented version of the doxyfile:

    # Note: This will also disable the warnings about undocumented members that are
    # normally produced when WARNINGS is set to YES.
    

    Using EXTRACT ALL can be useful for a first pass or to extract something from a non-doxygenned source, but in general it's a good idea to aim to be able to turn this off and thus be able to get the warnings that refine the parts that you actually need documented.