14
votes

I'm looking for a way to suppress doxygen warnings about undocumented member functions, but without using //! @cond and //! @endcond, so the member functions still appear in the synopsis of the class. Something like the following:

class Foo
{
public:
    Foo();
    Foo(const Foo&);
    Foo& operator=(const Foo&);
};

These member functions do the obvious thing and don't need documentation, but I still want them to appear in the list of available member functions in the documentation (because knowing that a class is copyable/assignable matters). As is, doxygen emits a "not documented" warning for each of these. If I use //! @cond and //! @endcond, the methods disappear completely from the documentation. What I would like is for the methods to remain visible in the documentation, but without any further comments, and I want oxygen to not complain about them being undocumented.

Is there some kind of "dummy comment" to tell doxygen to shut up about the lack of doc, but still preserve the methods in the documentation, so they are visible?

1
Is the configuration variable WARN_IF_UNDOCUMENTED what you are looking for? Set this to NO and Doxygen will not issue these warnings. You may also need to set EXTRACT_ALL to YES.Chris
That's not quite what I'm after. I want to suppress the warning for just a few methods, but keep the warning for other undocumented methods. In essence, what I'd like is something like //! @nowarn and //! @endnowarn. That way, I could have a silent build without lots of warnings, but still get alerted to methods that should be documented but are not.Michi Henning

1 Answers

12
votes

You just need to add brackets. This works for me:

//! \{
const int myVar3 = 3;
const int myVar4 = 3;
//! \}

There is no warning and it still appears in the output. You may alias this commants to \nowarn and \endnowarn if you like.