Formatting 是否有类似于C+的Doxygen块的linter/formatter/correction checker+;?

Formatting 是否有类似于C+的Doxygen块的linter/formatter/correction checker+;?,formatting,whitespace,doxygen,Formatting,Whitespace,Doxygen,以下是一些可以减少大量日常重复的事情: 当param节的数量与其下面的函数声明中的参数数量不匹配时,自动“标记”或提醒我doxygen块 理想情况下,告诉我参数的名称是否也不匹配 标记/提醒我其参数丢失的脱氧葡萄糖块[in],[out]或[in,out]。理想情况下,将标记为const的内容自动填充为[in] 可以一次在所有节的\和@之间进行转换,而不是使用查找和替换进行4次转换 以漂亮的方式格式化块的东西。举个例子,这里是一个简单的doxGin块,我认为“未格式化”: /** *\brie

以下是一些可以减少大量日常重复的事情:

  • param
    节的数量与其下面的函数声明中的参数数量不匹配时,自动“标记”或提醒我doxygen块
  • 理想情况下,告诉我参数的名称是否也不匹配
  • 标记/提醒我其参数丢失的脱氧葡萄糖块
    [in]
    [out]
    [in,out]
    。理想情况下,将标记为
    const
    的内容自动填充为
    [in]
  • 可以一次在所有节的
    \
    @
    之间进行转换,而不是使用查找和替换进行4次转换
  • 以漂亮的方式格式化块的东西。举个例子,这里是一个简单的doxGin块,我认为“未格式化”:
/**
*\brief给定网格中的位置,这将更新每代码边界。
*\param[in]代码-我们正在调整其边界的代码
*\param[in]位置1-新的下降位置
*\param[in]位置2-高级单元中较低单元的位置,
*这有一个很长的描述,可能包含几行。
*\返回我们必须移动的位置数
*/
int updateExtents(
常量对象代码,
施工地理::点和上部位置,
常量地理::点和下限);
下面是稍加修饰后的外观:

  /**
   * \brief Given a position in the grid, this updates the per-code bounds.

   * \param[in] code       - The code we are adjusting the bounds of
   * \param[in] position1  - The new lower position
   * \param[in] position2  - The position of the lower cell within the high-level cell, 
   *                         this has a long description that may wrap over a 
                             couple lines.

   * \return How many positions we had to move
   */
  int updateExtents(
      const ObjCode code,
      const Geo::Point<uint8_t>& upperPos,
      const Geo::Point<uint8_t>& lowerPos);
/**
*\brief给定网格中的位置,这将更新每代码边界。
*\param[in]代码-我们正在调整其边界的代码
*\param[in]位置1-新的下降位置
*\param[in]位置2-高级单元中较低单元的位置,
*这有一个很长的描述,可能会覆盖一个
几行。
*\返回我们必须移动的位置数
*/
int updateExtents(
常量对象代码,
施工地理::点和上部位置,
常量地理::点和下限);

这是非常主观的,但每个参数的描述现在都与最近的选项卡对齐,并在该点进行换行,而不是回到开始处。我发现这使它更具可读性

格式化是一项“IDE/编辑器”任务:编辑器/IDE是什么。最著名的软件都支持snippet。例如,在VisualStudio代码中,您可以创建或多或少自动化这些任务的代码段(查询用户、格式化、重复内容…)。在解析代码时,doxygen本身已经提出了关于缺少文档的大多数警告。你甚至可以找到已经制作好的插件:例如这个:我目前正在与QTCreator合作。
  /**
   * \brief Given a position in the grid, this updates the per-code bounds.

   * \param[in] code       - The code we are adjusting the bounds of
   * \param[in] position1  - The new lower position
   * \param[in] position2  - The position of the lower cell within the high-level cell, 
   *                         this has a long description that may wrap over a 
                             couple lines.

   * \return How many positions we had to move
   */
  int updateExtents(
      const ObjCode code,
      const Geo::Point<uint8_t>& upperPos,
      const Geo::Point<uint8_t>& lowerPos);