看起来其他人之前也问过这个问题。只是想确认一下是否已经找到答案。
我遇到了几种情况:当我记录各种功能时,有时会遇到这样的情况,我希望记录某些函数参数,但不是所有参数。例如:
/**
* This is the brief description for the function.
* And here is the detailed description.
* @param foo This parameter is not self-explanatory and needs a blurb
*/
void some_function(void *foo, int self_explanatory) {
// function does stuff
}
在Doxygen文档中添加"self_explanatory"参数只会增加混乱,所以我宁愿不加。但是,Doxygen会警告说该参数未记录。我正在使用Eclox,这些我不关心的警告很烦人。
现在,我的doxyfile已经设置了以下选项:
EXTRACT_ALL = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = NO
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAM_DOC = NO
警告仍然会生成。
其中一个选项是在有问题的代码周围添加
@cond
和@endcond
,但这样一来,我的函数的所有文档都没有生成。我需要文档,只是不需要警告。我想要的东西类似于...
/** @nowarn
* This is the brief description for the function.
* And here is the detailed description.
* @param foo This parameter is not self-explanatory and needs a blurb
* @endnowarn
*/
void some_function(void *foo, int self_explanatory) {
// function does stuff
}
...以使在封闭的代码块中不会生成警告。
我找到的其他SO问题:
抑制Doxygen警告
抑制未记录成员函数的Doxygen警告,但保留概要信息
是否可以选择要显示的Doxygen警告?