1+ # This file was generated with clang-format 4.0.0
2+ # $ clang-format -style Google -dump-config > .clang-format
3+ #
4+ # Read all about the available options here:
5+ # http://releases.llvm.org/4.0.0/tools/clang/docs/ClangFormatStyleOptions.html
6+ #
7+ # Spotify specific tweaks:
8+ #
9+ # ---
10+ # Language: Cpp
11+ #
12+ # - Standard Auto -> Cpp11
13+ # A<A<int>> instead of A<A<int> >
14+ #
15+ # - ColumnLimit 80 -> 100
16+ # We allow up to 100 characters per line
17+ #
18+ # - PointerAlignment Left -> Right
19+ # Always put '*' and '&' close to variable/function
20+ # Guidelines allows both alignments, but we want right (for legacy reasons)
21+ #
22+ # - DerivePointerAlignment: true -> false
23+ # Always put '*' and '&' close to variable/function
24+ # Guidelines allows both alignments, but we want right (for legacy reasons)
25+ #
26+ # - AllowShortFunctionsOnASingleLine: All -> Inline
27+ # We don't want to put out of class function definitions on a single line.
28+ # Standard allows it, but we prefer to keep the oneliners for methods inside classes.
29+ #
30+ # - BinPackArguments: true -> false
31+ # A function declaration’s or function definition’s parameters will either all be on the same
32+ # line or will have one line each.
33+ # Guidelines allows both true and false, but we like false better so we prefer that.
34+ #
35+ # - BinPackParameters: true -> false
36+ # A function call’s arguments will either be all on the same line or will have one line each.
37+ # Guidelines allows both true and false, but we like false better so we prefer that.
38+ #
39+ # - ForEachMacros: Remove all listed macros
40+ # We don't use foreach macros so clang-format shouldn't special treat any keywords.
41+ #
42+ # - IncludeCategories:
43+ # Tweaked priorities to match our preferred order.
44+ #
45+ # - ObjCSpaceAfterProperty: false -> true
46+ # Matches Spotifys Objective-C coding style, see https://github.com/spotify/ios-style
47+ #
48+ # - ObjCSpaceBeforeProtocolList: false -> true
49+ # Matches Spotifys Objective-C coding style, see https://github.com/spotify/ios-style
50+ #
51+ # ---
52+ # Language: ObjC
53+ #
54+ # Hand tweaked config that aims to match Spotifys Objective-C coding style,
55+ # see https://github.com/spotify/ios-style.
56+ #
57+ ---
58+ Language : Cpp
59+ # BasedOnStyle: Google
60+ AccessModifierOffset : -1
61+ AlignAfterOpenBracket : Align
62+ AlignConsecutiveAssignments : false
63+ AlignConsecutiveDeclarations : false
64+ AlignEscapedNewlinesLeft : true
65+ AlignOperands : true
66+ AlignTrailingComments : true
67+ AllowAllParametersOfDeclarationOnNextLine : true
68+ AllowShortBlocksOnASingleLine : false
69+ AllowShortCaseLabelsOnASingleLine : false
70+ AllowShortFunctionsOnASingleLine : Inline
71+ AllowShortIfStatementsOnASingleLine : true
72+ AllowShortLoopsOnASingleLine : true
73+ AlwaysBreakAfterDefinitionReturnType : None
74+ AlwaysBreakAfterReturnType : None
75+ AlwaysBreakBeforeMultilineStrings : true
76+ AlwaysBreakTemplateDeclarations : true
77+ BinPackArguments : false
78+ BinPackParameters : false
79+ # Note: BraceWrapping is ignored since BreakBeforeBraces isn't set to Custom
80+ BraceWrapping :
81+ AfterClass : false
82+ AfterControlStatement : false
83+ AfterEnum : false
84+ AfterFunction : false
85+ AfterNamespace : false
86+ AfterObjCDeclaration : false
87+ AfterStruct : false
88+ AfterUnion : false
89+ BeforeCatch : false
90+ BeforeElse : false
91+ IndentBraces : false
92+ BreakBeforeBinaryOperators : None
93+ BreakBeforeBraces : Attach
94+ BreakBeforeTernaryOperators : true
95+ BreakConstructorInitializersBeforeComma : false
96+ BreakAfterJavaFieldAnnotations : false
97+ BreakStringLiterals : true
98+ ColumnLimit : 100
99+ CommentPragmas : ' ^ IWYU pragma:'
100+ ConstructorInitializerAllOnOneLineOrOnePerLine : true
101+ ConstructorInitializerIndentWidth : 4
102+ ContinuationIndentWidth : 4
103+ Cpp11BracedListStyle : true
104+ DerivePointerAlignment : false
105+ DisableFormat : false
106+ ExperimentalAutoDetectBinPacking : false
107+ ForEachMacros : []
108+ IncludeCategories :
109+ - Regex : ' ^<spotify/config/config.h>'
110+ Priority : 3
111+ - Regex : ' ^<spotify/.*>'
112+ Priority : 4
113+ - Regex : ' ^["<]base/.*.h[">]'
114+ Priority : 5
115+ - Regex : ' ^".*"'
116+ Priority : 6
117+ - Regex : ' ^<[a-z_]*>'
118+ Priority : 1
119+ - Regex : ' ^<.*>'
120+ Priority : 2
121+ IncludeIsMainRegex : ' ([-_](test|unittest))?$'
122+ IndentCaseLabels : true
123+ IndentWidth : 2
124+ IndentWrappedFunctionNames : false
125+ JavaScriptQuotes : Leave
126+ JavaScriptWrapImports : true
127+ KeepEmptyLinesAtTheStartOfBlocks : false
128+ MacroBlockBegin : ' '
129+ MacroBlockEnd : ' '
130+ MaxEmptyLinesToKeep : 1
131+ NamespaceIndentation : None
132+ ObjCBlockIndentWidth : 2
133+ ObjCSpaceAfterProperty : true
134+ ObjCSpaceBeforeProtocolList : true
135+ PenaltyBreakBeforeFirstCallParameter : 1
136+ PenaltyBreakComment : 300
137+ PenaltyBreakFirstLessLess : 120
138+ PenaltyBreakString : 1000
139+ PenaltyExcessCharacter : 1000000
140+ PenaltyReturnTypeOnItsOwnLine : 200
141+ PointerAlignment : Right
142+ ReflowComments : true
143+ SortIncludes : true
144+ SpaceAfterCStyleCast : false
145+ SpaceAfterTemplateKeyword : true
146+ SpaceBeforeAssignmentOperators : true
147+ SpaceBeforeParens : ControlStatements
148+ SpaceInEmptyParentheses : false
149+ SpacesBeforeTrailingComments : 2
150+ SpacesInAngles : false
151+ SpacesInCStyleCastParentheses : false
152+ SpacesInContainerLiterals : true
153+ SpacesInParentheses : false
154+ SpacesInSquareBrackets : false
155+ Standard : Cpp11
156+ TabWidth : 8
157+ UseTab : Never
158+
159+ #
160+ # Objective-C
161+ #
162+ ---
163+ Language : ObjC
164+ # BasedOnStyle: Google
165+ AccessModifierOffset : -1
166+ AlignAfterOpenBracket : Align
167+ AlignConsecutiveAssignments : false
168+ AlignConsecutiveDeclarations : false
169+ AlignEscapedNewlinesLeft : true
170+ AlignOperands : true
171+ AlignTrailingComments : true
172+ AllowAllParametersOfDeclarationOnNextLine : true
173+ AllowShortBlocksOnASingleLine : false
174+ AllowShortCaseLabelsOnASingleLine : false
175+ AllowShortFunctionsOnASingleLine : false
176+ AllowShortIfStatementsOnASingleLine : false
177+ AllowShortLoopsOnASingleLine : false
178+ AlwaysBreakAfterDefinitionReturnType : None
179+ AlwaysBreakAfterReturnType : None
180+ AlwaysBreakBeforeMultilineStrings : true
181+ AlwaysBreakTemplateDeclarations : true
182+ BinPackArguments : false
183+ BinPackParameters : false
184+ BraceWrapping :
185+ AfterClass : false
186+ AfterControlStatement : false
187+ AfterEnum : false
188+ AfterFunction : true
189+ AfterNamespace : false
190+ AfterObjCDeclaration : false
191+ AfterStruct : false
192+ AfterUnion : false
193+ BeforeCatch : false
194+ BeforeElse : false
195+ IndentBraces : false
196+ BreakBeforeBinaryOperators : None
197+ BreakBeforeBraces : Custom
198+ BreakBeforeTernaryOperators : true
199+ BreakConstructorInitializersBeforeComma : false
200+ BreakAfterJavaFieldAnnotations : false
201+ BreakStringLiterals : true
202+ ColumnLimit : 120
203+ CommentPragmas : ' ^ IWYU pragma:'
204+ ConstructorInitializerAllOnOneLineOrOnePerLine : true
205+ ConstructorInitializerIndentWidth : 4
206+ ContinuationIndentWidth : 4
207+ Cpp11BracedListStyle : true
208+ DerivePointerAlignment : false
209+ DisableFormat : false
210+ ExperimentalAutoDetectBinPacking : false
211+ ForEachMacros : []
212+ IncludeCategories :
213+ - Regex : ' ^<spotify/config/config.h>'
214+ Priority : 3
215+ - Regex : ' ^<spotify/.*>'
216+ Priority : 4
217+ - Regex : ' ^["<]base/.*.h[">]'
218+ Priority : 5
219+ - Regex : ' ^".*"'
220+ Priority : 6
221+ - Regex : ' ^<[a-z_]*>'
222+ Priority : 1
223+ - Regex : ' ^<.*>'
224+ Priority : 2
225+ IncludeIsMainRegex : ' ([-_](test|unittest))?$'
226+ IndentCaseLabels : true
227+ IndentWidth : 4
228+ IndentWrappedFunctionNames : false
229+ JavaScriptQuotes : Leave
230+ JavaScriptWrapImports : true
231+ KeepEmptyLinesAtTheStartOfBlocks : false
232+ MacroBlockBegin : ' '
233+ MacroBlockEnd : ' '
234+ MaxEmptyLinesToKeep : 1
235+ NamespaceIndentation : None
236+ ObjCBlockIndentWidth : 4
237+ ObjCSpaceAfterProperty : true
238+ ObjCSpaceBeforeProtocolList : true
239+ PenaltyBreakBeforeFirstCallParameter : 1
240+ PenaltyBreakComment : 300
241+ PenaltyBreakFirstLessLess : 120
242+ PenaltyBreakString : 1000
243+ PenaltyExcessCharacter : 1000000
244+ PenaltyReturnTypeOnItsOwnLine : 200
245+ PointerAlignment : Right
246+ ReflowComments : true
247+ SortIncludes : true
248+ SpaceAfterCStyleCast : false
249+ SpaceAfterTemplateKeyword : true
250+ SpaceBeforeAssignmentOperators : true
251+ SpaceBeforeParens : ControlStatements
252+ SpaceInEmptyParentheses : false
253+ SpacesBeforeTrailingComments : 2
254+ SpacesInAngles : false
255+ SpacesInCStyleCastParentheses : false
256+ SpacesInContainerLiterals : true
257+ SpacesInParentheses : false
258+ SpacesInSquareBrackets : false
259+ Standard : Cpp11
260+ TabWidth : 4
261+ UseTab : Never
0 commit comments