| 基座 | LLVM / Google / Chromium / Mozilla / WebKit / Microsoft |
|---|---|
| 配置 | .clang-format(BasedOnStyle + 覆盖项) |
配置示例
配置示例
BasedOnStyle: Google
ColumnLimit: 100
IndentWidth: 4选定基座后尽量少改:选项改动越多,历史文件重排越频繁。
clang-format 按 .clang-format 配置格式化 C/C++ 等语言:内置 LLVM、Google、Chromium、Mozilla、WebKit、Microsoft 等基座风格,可局部覆盖选项。
| 基座 | LLVM / Google / Chromium / Mozilla / WebKit / Microsoft |
|---|---|
| 配置 | .clang-format(BasedOnStyle + 覆盖项) |
BasedOnStyle: Google
ColumnLimit: 100
IndentWidth: 4