doxdocgen icon indicating copy to clipboard operation
doxdocgen copied to clipboard

Use @retval instead of @return when "doxdocgen.generic.boolReturnsTrueFalse": true

Open Hadatko opened this issue 5 years ago • 2 comments

Description

Based on https://www.doxygen.nl/manual/commands.html i would expect that when "doxdocgen.generic.boolReturnsTrueFalse": true is set, then output will contains @retval true .. @retval false ... instead of @return true ... @return false ...

Code example

bool myFun(){}

Expected result

/**
 * @brief 
 *
 * @retval true ...
 * @retval false ...
 */

Actual result

/**
 * @brief 
 *
 * @return true ...
 * @return false .. 
 */

Hadatko avatar Jan 21 '21 10:01 Hadatko

Not really exclusive to the boolean option with the fact that "doxdocgen.generic.returnTemplate" can insert a type. Since "doxdocgen.generic.returnTemplate" is also an existing option and to not break peoples current config I'd go with a new option like "doxdocgen.generic.useRetVal".

cschlosser avatar Jan 21 '21 18:01 cschlosser

Hi. thank you for very quick response. Sorry i didn't get it much. in case of these settings: "doxdocgen.generic.returnTemplate": "@return {type} " // If this is enabled a bool return value will be split into true and false return param. "doxdocgen.generic.boolReturnsTrueFalse": true,

i would expect @retval <retvalOption> for boolean function and @return for others functions. Definitly i don't want replace return with retval in all cases. If you don't want change boolReturnsTrueFalse behavior you can rather create boolRetvalTrueFalse. But i would replace origin once maybe. It is up to you.

Hadatko avatar Jan 22 '21 07:01 Hadatko