当我选择ColumnLimit任意非零值时。它将块注释转换为Doxygen块注释(它在新行的*之前添加空格)。但我不想改变它。如何将其禁用?
我的.clang格式文件
ColumnLimit: 100
IndentWidth: 4
TabWidth: 4
UseTab: Never它转换以下块注释
/*****************************************************************************
* A brief comments.
*
* @param theory .
*
******************************************************************************/进入到这个
/*****************************************************************************
* A brief comments.
*
* @param theory .
*
******************************************************************************/注意:它在每行前面添加了空格,我不想要这些空格。我不想通过为每个Doxygen注释块禁用clang-format来解决这个问题。这看起来很可笑。
有什么好的建议吗?:-)
发布于 2021-02-10 22:34:47
在.clang-format文件中添加以下行
CommentPragmas: '^[^ ]'这将强制clang-format不更改代码中的任何注释。
https://stackoverflow.com/questions/60473112
复制相似问题