-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
54 lines (41 loc) · 1.76 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# The extra indent or outdent of access modifiers, e.g. public:.
AccessModifierOffset: -4
# If true, aligns escaped newlines as far left as possible.
# Otherwise puts them into the right-most column.
AlignEscapedNewlinesLeft: true
# If true, aligns trailing comments.
AlignTrailingComments: true
# Allow putting all parameters of a function declaration onto
# the next line even if BinPackParameters is false.
AllowAllParametersOfDeclarationOnNextLine: false
# If true, int f() { return 0; } can be put on a single line.
AllowShortFunctionsOnASingleLine: false
# If true, if (a) return; can be put on a single line.
AllowShortIfStatementsOnASingleLine: false
# If true, while (true) continue; can be put on a single line.
AllowShortLoopsOnASingleLine: false
# If true, always break after the template<…> of a template declaration.
AlwaysBreakTemplateDeclarations: true
# If the constructor initializers don’t fit on a line, put each initializer on its own line.
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# The number of columns to use for indentation.
IndentWidth: 4
BreakBeforeBraces: Attach
# The indentation used for namespaces.
# Possible values:
# - None (in configuration: None) Don’t indent in namespaces.
# - Inner (in configuration: Inner) Indent only in inner namespaces (nested in other namespaces).
# - All (in configuration: All) Indent in all namespaces.
NamespaceIndentation: All
# Sort includes
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '<[[:alnum:].]+>'
Priority: 4
- Regex: '.*'
Priority: 1
# If true, clang-format will attempt to re-flow comments.
ReflowComments: true