似乎其他人之前已经问过这个问题.只想查看是否找到答案.
我有几次出现以下情况:因为我正在记录各种函数,有时我会遇到我希望记录一些函数参数但不记录其他函数的情况.例如,
/**
* 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
}
Run Code Online (Sandbox Code Playgroud)
将self_explanatory参数添加到Doxygen文档只会增加混乱,所以我宁愿把它留下来.但是,Doxygen警告该参数未记录.我正在使用Eclox,并且有一些突出显示我不关心的警告很烦人.
现在,我的doxyfile设置了以下选项:
EXTRACT_ALL = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = NO
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAM_DOC = NO
Run Code Online (Sandbox Code Playgroud)
警告仍然生成.
一种选择是添加@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
}
Run Code Online (Sandbox Code Playgroud)
...以便在附带的代码块中不生成警告.
我发现的其他SO问题:
抑制Doxygen警告
抑制无证成员函数的doxygen警告,但是将概要留在原位
是否可以选择显示哪个Doxygen警告?
Hen*_*ski -2
只需记录 self_explanatory 参数,或者记住警告就是这样:警告。Doxygen 所要告诉您的是,有些事情您可能忽略了。
您可以接受警告或忽略它。如果您确实想抑制该警告,您可能需要查看您链接的第一个线程。具体来说,/sf/answers/1759627061/。