qt-creator - ClangFormat 的 80 个字符限制适用于以 @ 开头但不是 \ 的注释
问题描述
我有一个.clang-format
. ColumnLimit: '80'
当我为以下函数编写 doxygen 块时,它们被整齐地包装在 80 个字符中:
/**
* @brief Writes out the 80-byte header (in binary STL) for the STL representation of some geometry.
* @param[out] fileStream - The file to write the header to
*/
变成:
/**
* @brief Writes out the 80-byte header (in binary STL) for the STL
* representation of some geometry.
* @param[out] fileStream - The file to write the header to
*/
但是,如果我用它\
而不是它做同样的事情,@
如果它结束,它就不再自动换行:
/**
* \brief Writes out the 80-byte header (in binary STL) for the STL representation of some geometry.
* \param[out] fileStream - The file to write the header to
*/
我应该注意到 a 之后的以下行\
,或者只是杂散的注释块可以正常工作。IE,如果我这样做
/**
* Here is a really long comment that is greater than 80 characters, notice how it gets wrapped?
*/
它成为了:
/**
* Here is a really long comment that is greater than 80 characters, notice
* how it gets wrapped?
*/
为什么会这样?
Clang 版本:7.0.1
我的 IDE 是QTCreator,版本 4.7.2。我将其设置为在保存文件时重新格式化文件,这对所有事情都有效。(以 开头的注释行除外\
)
解决方案
推荐阅读
- python - 测量执行特定代码行的硬件性能
- php - 避免双重预订/双重消费
- c# - WIX 自定义操作在 InstallFinalize 之后修改 INSTALLFOLDER 中的文件
- excel - 清理 InternetExplorer 实例时返回 HTMLDocument 的有效方法
- android - JS UI在处理cameraX的图像分析时被阻塞
- python - 如何通过点击pygame中的按键来改变我的球方向?
- typescript - 使用 TypeScript 选项安装 Quasar 测试扩展时出现 Tsconfig 错误
- python - Jupyter Notebook 无法配置和安装库
- function - 在函数开始时计算的值稍后不会在同一函数中记住
- java - 通过在其上发送密码来保护我的 Nfc 标签