I'm trying to integrate doxygen in a C++ project. I'm using doxygen version 1.9.1
I would like that if a class/function had at least some documentation, doxygen enforced this documentation to be complete. See the following example
inline void hello_foo(const std::string & world)
{
std::cout << "Hello " << world << std::endl;
}
/**
* @brief Test incomplete documentation
*/
inline void hello_bar(const std::string & world)
{
std::cout << "Hello " << world << std::endl;
}
Here the first function (hello_foo) has no documentation at all.
The second function (hello_bar) has incomplete documentation as it's not documenting the input parameter.
I would like that doxygen generated only 1 warning on this file, i.e. the incomplete documentation in the second function. The purpose would be to enable "warning as errors", without having to first document the whole codebase.
I tried the following configurations. The other parameters are the default.
- This was my first attempt, but it does not produce any warning from the above code
WARNINGS = YES
WARN_IF_UNDOCUMENTED = NO
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = YES
- This configuration produces the warning I'm looking for, but it also produces warnings for the fully undocumented function.
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = YES
Thank you
EDIT:
It looks like WARN_NO_PARAMDOC is ignored when WARN_IF_UNDOCUMENTED=NO, but it works otherwise.
WARN_IF_UNDOCUMENTED = YES
WARN_NO_PARAMDOC = YES
this shows the missing param warnings
WARN_IF_UNDOCUMENTED = YES
WARN_NO_PARAMDOC = NO
This doesn't show them.