【问题标题】:Doxygen group warning: end of file inside a groupDoxygen 组警告:组内文件结尾
【发布时间】:2015-04-13 07:25:29
【问题描述】:

我正在尝试在以 @{ 结尾的 C 头文件中使用 doxygen(v1.8.9.1) @defgroup 注释,如下所示:

/** @file foo.h
 * @brief This is a foo file
 */

#ifndef FOO_H_
#define FOO_H_

#include somebar.h

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 * @{
 */

#ifdef __cpluplus
    extern "C" {
#endif

/* foo declarations here with standard doxygen documentation */

#ifdef __cpluplus
    }
#endif

/** @} */

#endif

这与doxygen-Grouping-Modules 的示例用法相匹配,但是,当我构建它时,这会在文件warning: end of file while inside a group 的末尾出现错误。

但是,如果开头 @{ 在单独的 doxygen 评论中,一切运行良好:

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 */
/** @{ */

这是一个错误还是我做错了什么?

【问题讨论】:

  • 我无法在 Windows 上使用 1.8.9、1.8.9.1 或来自 github 的当前 head 版本重现该消息。 Doxyfile 中的任何特殊设置(我使用了使用 doxygen -g 生成的设置)。
  • 嗯。那很奇怪。我没有使用 vanilla doxyfile,但到目前为止它只是更改了基本的东西,如路径、项目名称简介等、内联简单结构、调整页码的自定义乳胶标题、不提取本地类、隐藏的 undoc 成员和类,不显示包含文件,不排序成员文档,不生成TODO列表,不显示使用过的文件,不显示文件(文件在INPUT中按特定顺序添加)
  • 我还检查了所有组是否正确打开和关闭,它们是:\
  • 如果您在发布的示例中使用 vanilla Doxyfile 会发生什么?如果您在发布的示例中使用自己的 Doxyfile 会发生什么?
  • 嗯。对于只有发布代码的项目(+一个记录的 bar() 函数)的两个 doxyfile 都没有问题。所以我在我的文档中做错了什么。我不知道是什么,因为在这个阶段,如果我检查过一百次就检查过:\

标签: c module grouping doxygen


【解决方案1】:

我一直在尝试两种不同的开组方式,我将旧的开组器留在了非文档注释中,doxygen 显然仍将其视为文档注释。这意味着 doxygen 认为我打开了 两个 组,并且只关闭了其中一个!

例如

/** @defgroup foo Foo
 * @details This foo file does foo stuff
 * @{
 */

/* @{ */ // Note, only a single leading star so should not be treated as doxygen comment, yet it is.

/* Some code and documentation that is in a group here. */

/**@} */ // Close one group here but the second, unasked-for, group is not closed yet.
/* EOF */

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-04-01
    • 2020-12-24
    • 2011-03-31
    • 1970-01-01
    • 2019-12-21
    • 2018-05-09
    • 1970-01-01
    • 2014-09-29
    相关资源
    最近更新 更多