blob: b3baeda74a8cedcb5380ab63c5bf1d9c9764bdf9 [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
76MacroBlockBegin: 'SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START'
77MacroBlockEnd: 'SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END'
78MaxEmptyLinesToKeep: 1
79NamespaceIndentation: None
80ObjCBlockIndentWidth: 2
81ObjCSpaceAfterProperty: false
82ObjCSpaceBeforeProtocolList: false
83PenaltyBreakBeforeFirstCallParameter: 1
84PenaltyBreakComment: 300
85PenaltyBreakFirstLessLess: 120
86PenaltyBreakString: 1000
87PenaltyExcessCharacter: 1000000
88PenaltyReturnTypeOnItsOwnLine: 200
89PointerAlignment: Left
90ReflowComments: true
91SortIncludes: true
92SpaceAfterCStyleCast: false
93SpaceAfterTemplateKeyword: true
94SpaceBeforeAssignmentOperators: true
95SpaceBeforeParens: ControlStatements
96SpaceInEmptyParentheses: false
97SpacesBeforeTrailingComments: 2
98SpacesInAngles: false
99SpacesInContainerLiterals: true
100SpacesInCStyleCastParentheses: false
101SpacesInParentheses: false
102SpacesInSquareBrackets: false
103Standard: Auto
104TabWidth: 4
105UseTab: Never
106---
107Language: ObjC
108AccessModifierOffset: -4
109AlignAfterOpenBracket: Align
110AlignConsecutiveAssignments: false
111AlignConsecutiveDeclarations: false
112AlignEscapedNewlinesLeft: true
113AlignOperands: true
114AlignTrailingComments: true
115AllowAllParametersOfDeclarationOnNextLine: true
116AllowShortBlocksOnASingleLine: false
117AllowShortCaseLabelsOnASingleLine: false
118AllowShortFunctionsOnASingleLine: All
119AllowShortIfStatementsOnASingleLine: true
120AllowShortLoopsOnASingleLine: true
121AlwaysBreakAfterDefinitionReturnType: None
122AlwaysBreakAfterReturnType: None
123AlwaysBreakBeforeMultilineStrings: true
124AlwaysBreakTemplateDeclarations: true
125BinPackArguments: true
126BinPackParameters: true
127BraceWrapping:
128 AfterClass: false
129 AfterControlStatement: false
130 AfterEnum: false
131 AfterFunction: false
132 AfterNamespace: false
133 AfterObjCDeclaration: false
134 AfterStruct: false
135 AfterUnion: false
136 BeforeCatch: false
137 BeforeElse: false
138 IndentBraces: false
139BreakBeforeBinaryOperators: None
140BreakBeforeBraces: Custom
141BreakBeforeTernaryOperators: true
142BreakConstructorInitializersBeforeComma: true
143BreakAfterJavaFieldAnnotations: false
144BreakStringLiterals: true
145ColumnLimit: 100
146CommentPragmas: '^ IWYU pragma:'
147ConstructorInitializerAllOnOneLineOrOnePerLine: true
148ConstructorInitializerIndentWidth: 8
149ContinuationIndentWidth: 8
150Cpp11BracedListStyle: true
151DerivePointerAlignment: false
152DisableFormat: false
153ExperimentalAutoDetectBinPacking: true
154ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
155IncludeCategories:
Brian Salomonb4a24e52016-12-08 09:21:00 -0500156 - Regex: '^<.*\.h>'
157 Priority: 1
158 - Regex: '^<.*'
159 Priority: 2
160 - Regex: '.*'
161 Priority: 3
162IncludeIsMainRegex: '([-_](test|unittest))?$'
163IndentCaseLabels: true
164IndentWidth: 4
165IndentWrappedFunctionNames: false
166JavaScriptQuotes: Leave
167JavaScriptWrapImports: true
168KeepEmptyLinesAtTheStartOfBlocks: false
Brian Salomonc083e4f2017-01-09 09:37:06 -0500169MacroBlockBegin: 'SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START'
170MacroBlockEnd: 'SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END'
Brian Salomonb4a24e52016-12-08 09:21:00 -0500171MaxEmptyLinesToKeep: 1
172NamespaceIndentation: None
173ObjCBlockIndentWidth: 2
174ObjCSpaceAfterProperty: false
175ObjCSpaceBeforeProtocolList: false
176PenaltyBreakBeforeFirstCallParameter: 1
177PenaltyBreakComment: 300
178PenaltyBreakFirstLessLess: 120
179PenaltyBreakString: 1000
180PenaltyExcessCharacter: 1000000
181PenaltyReturnTypeOnItsOwnLine: 200
182PointerAlignment: Left
183ReflowComments: true
184SortIncludes: true
185SpaceAfterCStyleCast: false
186SpaceAfterTemplateKeyword: true
187SpaceBeforeAssignmentOperators: true
188SpaceBeforeParens: ControlStatements
189SpaceInEmptyParentheses: false
190SpacesBeforeTrailingComments: 2
191SpacesInAngles: false
192SpacesInContainerLiterals: true
193SpacesInCStyleCastParentheses: false
194SpacesInParentheses: false
195SpacesInSquareBrackets: false
196Standard: Auto
197TabWidth: 4
198UseTab: Never
199...
200