3 # Use tabs whenever we need to fill whitespace that spans at least from one tab
4 # stop to the next one.
8 ContinuationIndentWidth: 8
11 # C Language specifics
14 # Align parameters on the open bracket
15 # someLongFunction(argument1,
17 AlignAfterOpenBracket: Align
19 # Don't align consecutive assignments
22 AlignConsecutiveAssignments: false
24 # Don't align consecutive declarations
27 AlignConsecutiveDeclarations: false
29 # Align escaped newlines as far left as possible
34 AlignEscapedNewlines: Left
36 # Align operands of binary and ternary expressions
37 # int aaa = bbbbbbbbbbb +
41 # Don't align trailing comments
43 # int b = 2; // Comment b
44 AlignTrailingComments: false
46 # By default don't allow putting parameters onto the next line
47 # myFunction(foo, bar, baz);
48 AllowAllParametersOfDeclarationOnNextLine: false
50 # Don't allow short braced statements to be on a single line
51 # if (a) not if (a) return;
53 AllowShortBlocksOnASingleLine: false
54 AllowShortCaseLabelsOnASingleLine: false
55 AllowShortFunctionsOnASingleLine: false
56 AllowShortIfStatementsOnASingleLine: false
57 AllowShortLoopsOnASingleLine: false
59 # By default don't add a line break after the return type of top-level functions
61 AlwaysBreakAfterReturnType: None
63 # Pack as many parameters or arguments onto the same line as possible
64 # int myFunction(int aaaaaaaaaaaa, int bbbbbbbb,
66 BinPackArguments: true
67 BinPackParameters: true
69 # Attach braces to surrounding context except break before braces on function
77 BreakBeforeBraces: Linux
79 # Break after operators
80 # int valuve = aaaaaaaaaaaaa +
83 BreakBeforeBinaryOperators: None
84 BreakBeforeTernaryOperators: false
86 # Don't break string literals
87 BreakStringLiterals: false
89 # Use the same indentation level as for the switch statement.
90 # Switch statement body is always indented one level more than case labels.
91 IndentCaseLabels: false
93 # Don't indent a function definition or declaration if it is wrapped after the
95 IndentWrappedFunctionNames: false
97 # Align pointer to the right
99 PointerAlignment: Right
101 # Don't insert a space after a cast
102 # x = (int32)y; not x = (int32) y;
103 SpaceAfterCStyleCast: false
105 # Insert spaces before and after assignment operators
106 # int a = 5; not int a=5;
108 SpaceBeforeAssignmentOperators: true
110 # Put a space before opening parentheses only after control statement keywords.
116 SpaceBeforeParens: ControlStatements
118 # Don't insert spaces inside empty '()'
119 SpaceInEmptyParentheses: false
121 # The number of spaces before trailing line comments (// - comments).
122 # This does not affect trailing block comments (/* - comments).
123 SpacesBeforeTrailingComments: 1
125 # Don't insert spaces in casts
126 # x = (int32) y; not x = ( int32 ) y;
127 SpacesInCStyleCastParentheses: false
129 # Don't insert spaces inside container literals
130 # var arr = [1, 2, 3]; not var arr = [ 1, 2, 3 ];
131 SpacesInContainerLiterals: false
133 # Don't insert spaces after '(' or before ')'
134 # f(arg); not f( arg );
135 SpacesInParentheses: false
137 # Don't insert spaces after '[' or before ']'
138 # int a[5]; not int a[ 5 ];
139 SpacesInSquareBrackets: false
141 # Insert a space after '{' and before '}' in struct initializers
142 Cpp11BracedListStyle: false
144 # A list of macros that should be interpreted as foreach loops instead of as
146 ForEachMacros: ['for_each_string_list_item']
148 # The maximum number of consecutive empty lines to keep.
149 MaxEmptyLinesToKeep: 1
151 # No empty line at the start of a block.
152 KeepEmptyLinesAtTheStartOfBlocks: false
155 # This decides what order things should be done if a line is too long
156 PenaltyBreakAssignment: 100
157 PenaltyBreakBeforeFirstCallParameter: 100
158 PenaltyBreakComment: 100
159 PenaltyBreakFirstLessLess: 0
160 PenaltyBreakString: 100
161 PenaltyExcessCharacter: 5
162 PenaltyReturnTypeOnItsOwnLine: 0
164 # Don't sort #include's