-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
.clang-format
79 lines (79 loc) · 2.28 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
# Common configuration for all languages
BasedOnStyle: Google
IndentWidth: 4
TabWidth: 8
UseTab: Never
# A ColumnLimit > 0 causes clang-format to unbreaks all short lines,
# which is undesired here.
# If the line length exceeds 100, "ColumnLimit: 80" is used in tools/clang_format.py
ColumnLimit: 0
---
Language: Cpp
Standard: c++20
# Customize only those options that differ from the base style!
# Dumping the options of the base style for comparison:
# clang-format -style=google -dump-config > .clang-format_google
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignOperands: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
IndentCaseLabels: false
DerivePointerAlignment: false
SpaceAfterTemplateKeyword: false
SpacesBeforeTrailingComments: 1
# StatementMacros don't require a trailing semicolon.
# Trailing semicolons should be omitted after these macros
# when compiling with -Wpedantic to avoid warnings.
StatementMacros:
- Q_DECLARE_FLAGS
- Q_DECLARE_METATYPE
- Q_DECLARE_OPERATORS_FOR_FLAGS
- Q_OBJECT
- Q_PROPERTY
- Q_UNUSED
- QT_REQUIRE_VERSION
---
Language: ObjC
ObjCBlockIndentWidth: 4
# We exclude Objective-C(++) from the second line-wrapping pass in tools/clang_format.py
# since this pass only applies C++ rules and therefore include the ColumnLimit in the
# 'main' clang-format config here.
ColumnLimit: 80
# Apply the same customizations that we use for Cpp to ObjC.
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignOperands: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
IndentCaseLabels: false
DerivePointerAlignment: false
SpaceAfterTemplateKeyword: false
SpacesBeforeTrailingComments: 1
StatementMacros:
- Q_DECLARE_FLAGS
- Q_DECLARE_METATYPE
- Q_DECLARE_OPERATORS_FOR_FLAGS
- Q_OBJECT
- Q_PROPERTY
- Q_UNUSED
- QT_REQUIRE_VERSION
---
Language: JavaScript
# Don't format .js files yet
DisableFormat: true
---
Language: Proto
# Don't format .proto files yet
DisableFormat: true