0%

clang-format格式文件存档

常用 .clang-format style 文件存档

Google Style
1
2
3
4
5
BasedOnStyle: Google
IndentWidth: 2
ColumnLimit: 80
DerivePointerAlignment: false
PointerAlignment: Left
LLVM Style
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
BasedOnStyle:  LLVM
ColumnLimit: 80
AlignAfterOpenBracket: AlwaysBreak
AlignEscapedNewlines: Left
AllowShortFunctionsOnASingleLine: InlineOnly
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Allman
ConstructorInitializerAllOnOneLineOrOnePerLine: true
IncludeBlocks: Preserve
IndentCaseLabels: true
NamespaceIndentation: All
PointerAlignment: Left
SortIncludes: false
TabWidth: 2

使用参考