1 # Format of this file is YAML
2 # Minimum clang-format version required: clang-format version 3.6.0
3 # Detailed description of options available at http://clang.llvm.org/docs/ClangFormatStyleOptions.html
5 AlignEscapedNewlinesLeft: true
14 # someOtherFunction();
17 AlignTrailingComments: true
18 # align all comments to right based of //
19 # == Avoid using // based comments altogether ==
21 AllowAllParametersOfDeclarationOnNextLine: true
22 # allow funtion definition as
27 AlignConsecutiveAssignments: true
28 # aligns consecutive assignments with '=' operator
30 AllowShortBlocksOnASingleLine: true
31 # single statement block can be merged on one line
32 # e.g if (a) { return; }
34 AllowShortCaseLabelsOnASingleLine: false
35 # Single statement case statements should be on their own lines
37 AllowShortFunctionsOnASingleLine: None
39 # int foo() { return 123; }
41 AllowShortIfStatementsOnASingleLine: false
43 # if (someOtherVar) return;
48 AllowShortLoopsOnASingleLine: false
56 AlwaysBreakAfterDefinitionReturnType: true
57 # Ensures return type is one its own line
59 # function(char param) { }
61 AlwaysBreakBeforeMultilineStrings: true
62 # multine strings should begin on new line
64 BinPackArguments: true
65 BinPackParameters: false
66 # functions arguments should all be on one line or have a single line for each param
68 BreakBeforeBinaryOperators: None
69 # break for new line after binary operator in case of length is over ColumnLimit
74 BreakBeforeBraces: Linux
75 # Always attach braces to surrounding context except -
76 # break before braces on function, namespace and class definitions
79 # every body has wide screen now. 132 seems to be reasonable limit now.
81 IndentCaseLabels: false
82 # case labels have same indentation as switch statement.
85 # 4 spaces for indentation
87 # tabwidth is 4 spaces
89 UseTab: ForIndentation
90 # tab for indentation only. All alignment should happen with spaces
91 # Simple rule to check.
92 # No tabs allowed after first 'non-tab' character in a line
94 IndentWrappedFunctionNames: false
95 KeepEmptyLinesAtTheStartOfBlocks: false
96 # remove excess empty lines at start of blocks.
98 PointerAlignment: Middle
100 SpaceAfterCStyleCast: false
101 # No space after (cast). E.g
102 # int blah = (int)((void *)foo + bar)
104 SpaceBeforeAssignmentOperators: true
105 # Assignment = should be seperated by spaces on both sides.
107 SpaceBeforeParens: ControlStatements
108 # for control statements a space is required before '('
109 # Bad: for() { statement; }
110 # Good: for () { statement; }
111 # This setting distinguishes functions() from keywords like 'if' and 'for'.
113 SpaceInEmptyParentheses: false
114 # No spaces required for empty ()
116 SpacesInCStyleCastParentheses: false
117 # No spaces required for (unsigned int) type cast
119 SpacesInParentheses: false
121 SpacesInSquareBrackets: false
122 # No spaces in [count] style invocations of []