是否可以选择显示哪个 Doxygen 警告?
Doxygen 显示一个化合物 ?没有记录。
构建时发出警告。对于特定项目,我不想记录化合物。为了消除混乱,我想看到除该警告之外的所有其他警告。有没有办法清理 Doxygen 输出?
Doxygen shows a Compound ? is not documented.
warning when building. For a specific project I don't want to document Compounds. To remove clutter I want to see all other warnings except that one. Is there a way to clean the Doxygen output?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为这是不可能的,除非编写自己的后处理器来过滤 doxygen 输出。在你的情况下,这应该不会太难,一个简单的 grep 应该就足够了:
我不太确定为什么 doxygen 不提供此功能:也许它需要太多选项,或更复杂选项。另一种可能性是,他们假设由于您希望在未记录某些内容时收到警告,因此除非在源代码中明确指定(使用
\cond
和\endcond< /code>,例如),其理由是这种省略只能根据具体情况来决定。或者也许没有人要求他们包含此功能:请随意填写功能请求。
I don't think this is possible, except by writing your own post-processor to filter doxygen output. In your case, this should not be too hard, a simple
grep
should be sufficient:I'm not really sure why doxygen does not provide this feature: perhaps it would require too much options, or more complicated options. Another possibility is that they assumed that since you want to be warned when something is not documented, there should be no exceptions except when explicitly specified in the source code (using
\cond
and\endcond
, for example), with the rationale that this kind of omission should only be decided on a case-by-case basis. Or perhaps nobody ever asked them to include this feature: feel free to fill in a feature request.我认为您正在寻找的是
if
、ifnot
和endif
命令。只需决定一个合适的标签,然后使用正确的标签即可。例如:doxygen 将评估它是否知道这个标签,如果不知道,他将忽略同一注释块中
\endif
命令之前的任何注释然后您需要定义(或不是)您的 doxyfile 中 ENABLED_SECTIONS 中的该标签。
看看
\cond
和\endcond
命令,它们相似但不完全相同(它们启用或禁用文件的整个部分,而不仅仅是单个注释堵塞)。I think what you're looking for is the
if
,ifnot
andendif
commands. Just decide an appropriate label then use the correct tag. Ex.:doxygen will evaluate if it knows of this label and if it doesn't, he'll ignore any comment up to the
\endif
command in the same comment blockThen you need to define (or not) that label in your doxyfile in the ENABLED_SECTIONS.
Have a look at the
\cond
and\endcond
commands too which are similar but not quite the same (they enable or disable entire sections of a file, not just a single comment block).您可以在 doxygen 配置中关闭警告。
请参阅此处:doxygen 文档
我最喜欢的是:WARN_IF_UNDOCUMENTED = NO
You can switch off warnings in the doxygen configuration.
See here: doxygen documenation
My favorite is: WARN_IF_UNDOCUMENTED = NO