blob: 018b06f254e5f001ddb4625349b246bdf5fbd238 [file] [log] [blame]
Brian Salomonb4a24e52016-12-08 09:21:00 -05001---
2# Typical usage is to apply this to the lines you've modified in a local
3# change. Stage your changes with "git add" and then run:
4# $ git clang-format
5# You can optionally use the "--" file filter to restrict formatting to certain
6# files or directories. The tool will display the list of files that were
7# modified. These have been modified without being staged. You can review the
8# modifications using "git diff".
9#
Brian Salomon21831422018-07-27 16:26:26 -040010# IF YOU UPDATE THE CPP SECTION ALSO UPDATE THE OBJECTIVE-C SECTION. IF YOU
11# KNOW HOW TO SHARE SETTINGS BETWEEN THE TWO YOU'RE A TRUE HERO.
12
Brian Salomonb4a24e52016-12-08 09:21:00 -050013Language: Cpp
14# BasedOnStyle: Google
15AccessModifierOffset: -4
16AlignAfterOpenBracket: Align
17AlignConsecutiveAssignments: false
18AlignConsecutiveDeclarations: false
19AlignEscapedNewlinesLeft: true
20AlignOperands: true
21AlignTrailingComments: true
22AllowAllParametersOfDeclarationOnNextLine: true
23AllowShortBlocksOnASingleLine: false
24AllowShortCaseLabelsOnASingleLine: false
25AllowShortFunctionsOnASingleLine: All
Mike Klein8f451382018-05-24 13:27:13 +000026AllowShortIfStatementsOnASingleLine: true
27AllowShortLoopsOnASingleLine: true
Brian Salomonb4a24e52016-12-08 09:21:00 -050028AlwaysBreakAfterDefinitionReturnType: None
29AlwaysBreakAfterReturnType: None
30AlwaysBreakBeforeMultilineStrings: true
31AlwaysBreakTemplateDeclarations: true
32BinPackArguments: true
33BinPackParameters: true
Brian Salomon21831422018-07-27 16:26:26 -040034BraceWrapping:
Brian Salomonb4a24e52016-12-08 09:21:00 -050035 AfterClass: false
36 AfterControlStatement: false
37 AfterEnum: false
38 AfterFunction: false
39 AfterNamespace: false
40 AfterObjCDeclaration: false
41 AfterStruct: false
42 AfterUnion: false
43 BeforeCatch: false
44 BeforeElse: false
45 IndentBraces: false
46BreakBeforeBinaryOperators: None
47BreakBeforeBraces: Custom
48BreakBeforeTernaryOperators: true
49BreakConstructorInitializersBeforeComma: true
50BreakAfterJavaFieldAnnotations: false
51BreakStringLiterals: true
52ColumnLimit: 100
53CommentPragmas: '^ IWYU pragma:'
54ConstructorInitializerAllOnOneLineOrOnePerLine: true
Brian Salomon544851b2016-12-14 09:17:55 -050055ConstructorInitializerIndentWidth: 8
Brian Salomonb4a24e52016-12-08 09:21:00 -050056ContinuationIndentWidth: 8
57Cpp11BracedListStyle: true
58DerivePointerAlignment: false
59DisableFormat: false
60ExperimentalAutoDetectBinPacking: true
61ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
Brian Salomon21831422018-07-27 16:26:26 -040062IncludeCategories:
63 - Regex: '^<.*\.h>'
64 Priority: 1
65 - Regex: '^<.*'
66 Priority: 2
67 - Regex: '.*'
68 Priority: 3
69IncludeIsMainRegex: '([-_](test|unittest))?$'
70IndentCaseLabels: true
71IndentWidth: 4
72IndentWrappedFunctionNames: false
73JavaScriptQuotes: Leave
74JavaScriptWrapImports: true
75KeepEmptyLinesAtTheStartOfBlocks: false
Brian Salomon21831422018-07-27 16:26:26 -040076MaxEmptyLinesToKeep: 1
77NamespaceIndentation: None
78ObjCBlockIndentWidth: 2
79ObjCSpaceAfterProperty: false
80ObjCSpaceBeforeProtocolList: false
81PenaltyBreakBeforeFirstCallParameter: 1
82PenaltyBreakComment: 300
83PenaltyBreakFirstLessLess: 120
84PenaltyBreakString: 1000
85PenaltyExcessCharacter: 1000000
86PenaltyReturnTypeOnItsOwnLine: 200
87PointerAlignment: Left
88ReflowComments: true
89SortIncludes: true
90SpaceAfterCStyleCast: false
91SpaceAfterTemplateKeyword: true
92SpaceBeforeAssignmentOperators: true
93SpaceBeforeParens: ControlStatements
94SpaceInEmptyParentheses: false
95SpacesBeforeTrailingComments: 2
96SpacesInAngles: false
97SpacesInContainerLiterals: true
98SpacesInCStyleCastParentheses: false
99SpacesInParentheses: false
100SpacesInSquareBrackets: false
101Standard: Auto
102TabWidth: 4
103UseTab: Never
104---
105Language: ObjC
106AccessModifierOffset: -4
107AlignAfterOpenBracket: Align
108AlignConsecutiveAssignments: false
109AlignConsecutiveDeclarations: false
110AlignEscapedNewlinesLeft: true
111AlignOperands: true
112AlignTrailingComments: true
113AllowAllParametersOfDeclarationOnNextLine: true
114AllowShortBlocksOnASingleLine: false
115AllowShortCaseLabelsOnASingleLine: false
116AllowShortFunctionsOnASingleLine: All
117AllowShortIfStatementsOnASingleLine: true
118AllowShortLoopsOnASingleLine: true
119AlwaysBreakAfterDefinitionReturnType: None
120AlwaysBreakAfterReturnType: None
121AlwaysBreakBeforeMultilineStrings: true
122AlwaysBreakTemplateDeclarations: true
123BinPackArguments: true
124BinPackParameters: true
125BraceWrapping:
126 AfterClass: false
127 AfterControlStatement: false
128 AfterEnum: false
129 AfterFunction: false
130 AfterNamespace: false
131 AfterObjCDeclaration: false
132 AfterStruct: false
133 AfterUnion: false
134 BeforeCatch: false
135 BeforeElse: false
136 IndentBraces: false
137BreakBeforeBinaryOperators: None
138BreakBeforeBraces: Custom
139BreakBeforeTernaryOperators: true
140BreakConstructorInitializersBeforeComma: true
141BreakAfterJavaFieldAnnotations: false
142BreakStringLiterals: true
143ColumnLimit: 100
144CommentPragmas: '^ IWYU pragma:'
145ConstructorInitializerAllOnOneLineOrOnePerLine: true
146ConstructorInitializerIndentWidth: 8
147ContinuationIndentWidth: 8
148Cpp11BracedListStyle: true
149DerivePointerAlignment: false
150DisableFormat: false
151ExperimentalAutoDetectBinPacking: true
152ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
153IncludeCategories:
Brian Salomonb4a24e52016-12-08 09:21:00 -0500154 - Regex: '^<.*\.h>'
155 Priority: 1
156 - Regex: '^<.*'
157 Priority: 2
158 - Regex: '.*'
159 Priority: 3
160IncludeIsMainRegex: '([-_](test|unittest))?$'
161IndentCaseLabels: true
162IndentWidth: 4
163IndentWrappedFunctionNames: false
164JavaScriptQuotes: Leave
165JavaScriptWrapImports: true
166KeepEmptyLinesAtTheStartOfBlocks: false
Brian Salomonb4a24e52016-12-08 09:21:00 -0500167MaxEmptyLinesToKeep: 1
168NamespaceIndentation: None
169ObjCBlockIndentWidth: 2
170ObjCSpaceAfterProperty: false
171ObjCSpaceBeforeProtocolList: false
172PenaltyBreakBeforeFirstCallParameter: 1
173PenaltyBreakComment: 300
174PenaltyBreakFirstLessLess: 120
175PenaltyBreakString: 1000
176PenaltyExcessCharacter: 1000000
177PenaltyReturnTypeOnItsOwnLine: 200
178PointerAlignment: Left
179ReflowComments: true
180SortIncludes: true
181SpaceAfterCStyleCast: false
182SpaceAfterTemplateKeyword: true
183SpaceBeforeAssignmentOperators: true
184SpaceBeforeParens: ControlStatements
185SpaceInEmptyParentheses: false
186SpacesBeforeTrailingComments: 2
187SpacesInAngles: false
188SpacesInContainerLiterals: true
189SpacesInCStyleCastParentheses: false
190SpacesInParentheses: false
191SpacesInSquareBrackets: false
192Standard: Auto
193TabWidth: 4
194UseTab: Never
195...
196