Doxygen: how to get expected undocumented warnings when a function is in the @name description

My doxygen configuration file indicates:

WARN_NO_PARAMDOC       = YES
WARN_IF_UNDOCUMENTED   = YES

The meaning is that I want to receive a warning when a function is not documented or partially documented. Because I have a requirement that the code be fully documented.

When I ran doxygen in this code:

/** Description */
class A
{
public:
    void func1();
    int func2( int param1, int param2 );

    /** Partial description (missing a parameter)
     * \param param1 description
     * \return description
     */
    int func3( int param1, int param2 );

    /** Partial description (missing return value)
     * \param param1 description
     */
    int func4( int param1 );
};

I get 4 warnings:

warning : Member func1() (function) of class A is not documented.
warning : Member func2(int param1, int param2) (function) of class A is not documented. 
warning : The following parameters of A::func3(int param1, int param2) are not documented.
warning : return type of member A::func4 is not documented

Fine

Now, if someone adds /** \name */functions before some declarations, as shown below:

/** Description */
class A
{
public:

    /** \name first functions: */

    void func1();
    int func2( int param1, int param2 );

    /** \name second functions: */

    /** Partial description (missing a parameter)
     * \param param1 description
     * \return description
     */
    int func3( int param1, int param2 );

    /** Partial description (missing return value)
     * \param param1 description
     */
    int func4( int param1 );
};

Then we get only two warnings:

warning : The following parameters of A::func3(int param1, int param2) are not documented:
warning : return type of member A::func4 is not documented
  • The fact that func1it has no documentation is no longer reported. It can be argued that he has documentation inherited from the flag \name, but it is definitely not documented!

  • , func2 . :-), , .

, - , : enter image description here

\name 4 ? ( doxyfile, ?).

:

  • \name
  • , \name , " :" " :" , .

\name @name name(not a doxygen flag), , , name(not a doxygen flag) \name .... . .

: doxygen https://bugzilla.gnome.org/show_bug.cgi?id=780912

+4

Source: https://habr.com/ru/post/1673957/


All Articles