Clang格式不使用.clang格式的文件ubuntu(没有错误)
Clang-format not using .clang-format file ubuntu (no errors)
我的项目目录中有一个.clang-format
,里面有我的.cpp文件和构建目录。从我的终端,我cd到我的项目文件夹并运行clang-format -style=file -i *.cpp
.这是我.clang-format
文件。
Language: Cpp
ColumnLimit: 0
BreakBeforeBraces: GNU
BreakConstructorInitializers: AfterColon
Cpp11BracedListStyle: true
IndentCaseLabels: true
NamespaceIndentation: All
IndentWidth: 4
TabWidth: 4
UseTab: Never
DerivePointerAlignment: false
PointerAlignment: Left
IncludeBlocks: Regroup
我正在通过更改BreakBeforeBraces
来测试功能,但没有任何变化。它似乎正在使用回退格式。这是怎么回事?有没有办法看到clang-format
实际上在做什么?
当使用-style=file
时,每个输入文件的 clang 格式将尝试查找位于输入文件最近的父目录中的 .clang 格式文件。使用标准输入时,将从当前目录开始搜索。
您可以使用以下命令查看运行目录中使用的实际配置
clang-format -style=file -dump-config
相关文章:
- 在Ubuntu 16.04上安装Cilk时出现问题
- 如何在openssl-ecc中获取十六进制格式的私钥
- 将"打开的CV图像"中的"颜色"转换为整数格式
- TDateTime格式在C++Builder中不会更改
- 如何在Ubuntu中使用cmake设置qt4
- 链接阶段在Ubuntu上失败,但在MacOS上失败
- 如何防止clang格式在流运算符调用之间添加换行符<<
- 检查不带转换的扫描格式
- 当我尝试使用 sstream 和分面将 Boost Time_duration转换为字符串时,我没有得到所需的格式
- 是否可以从格式字符串中检索"width"
- clang格式:宏的缩进
- clang格式:禁用排序包含
- 在用于格式4的arm模拟器中实现功能时的一个问题
- 将RGB图像保存为PPM格式
- 询问在设计我的手臂模拟器功能表示格式1
- 当使用比格式支持的精度更高的精度来显示数字时,会写出什么数据
- 带有Protobuf序列化的C++Hazelcast:字符串不是UTF-8格式的
- 无法将 GLFW 库与 Ubuntu 18.04 上的头文件链接
- 如何将strftime中的格式错误作为异常捕获
- Clang格式不使用.clang格式的文件ubuntu(没有错误)