Drop unused printing code templates
[TortoiseGit.git] / src / .clang-format
blobe64b2f176a0d3ddbe0d38d40bd21cebb503017ee
1 # This file is an example configuration for clang-format 5.0.\r
2 #\r
3 # Note that this style definition should only be understood as a hint\r
4 # for writing new code. The rules are still work-in-progress and does\r
5 # not yet exactly match the style we have in the existing code.\r
6 \r
7 # C Language specifics\r
8 Language: Cpp\r
9 \r
10 ColumnLimit: 0\r
11 UseTab: Always\r
12 TabWidth: 4\r
13 IndentWidth: 4\r
14 ContinuationIndentWidth: 0\r
15 ConstructorInitializerIndentWidth: 4\r
16 AccessModifierOffset: -4\r
18 # Align parameters on the open bracket\r
19 # someLongFunction(argument1,\r
20 #                  argument2);\r
21 AlignAfterOpenBracket: Align\r
23 # Don't align consecutive assignments\r
24 # int aaaa = 12;\r
25 # int b = 14;\r
26 AlignConsecutiveAssignments: false\r
28 # Don't align consecutive declarations\r
29 # int aaaa = 12;\r
30 # double b = 3.14;\r
31 AlignConsecutiveDeclarations: false\r
33 # Align escaped newlines as far left as possible\r
34 # #define A   \\r
35 #   int aaaa; \\r
36 #   int b;    \\r
37 #   int cccccccc;\r
38 AlignEscapedNewlines: Left\r
40 # Align operands of binary and ternary expressions\r
41 # int aaa = bbbbbbbbbbb +\r
42 #           cccccc;\r
43 AlignOperands: true\r
45 # Don't align trailing comments\r
46 # int a; // Comment a\r
47 # int b = 2; // Comment b\r
48 AlignTrailingComments: false\r
50 # By default don't allow putting parameters onto the next line\r
51 # myFunction(foo, bar, baz);\r
52 AllowAllParametersOfDeclarationOnNextLine: false\r
54 # Don't allow short braced statements to be on a single line\r
55 # if (a)           not       if (a) return;\r
56 #   return;\r
57 AllowShortBlocksOnASingleLine: false\r
58 AllowShortCaseLabelsOnASingleLine: false\r
59 AllowShortFunctionsOnASingleLine: Inline\r
60 AllowShortIfStatementsOnASingleLine: false\r
61 AllowShortLoopsOnASingleLine: false\r
63 # By default don't add a line break after the return type of top-level functions\r
64 # int foo();\r
65 AlwaysBreakAfterReturnType: None\r
67 # Pack as many parameters or arguments onto the same line as possible\r
68 # int myFunction(int aaaaaaaaaaaa, int bbbbbbbb,\r
69 #                int cccc);\r
70 BinPackArguments: true\r
71 BinPackParameters: true\r
73 # Attach braces to surrounding context except break before braces on function\r
74 # definitions.\r
75 # void foo()\r
76 # {\r
77 #    if (true)\r
78 #    {\r
79 #    }\r
80 #    else\r
81 #    {\r
82 #    }\r
83 # };\r
84 BreakBeforeBraces: Custom\r
85 BraceWrapping:\r
86   AfterEnum: true\r
87   AfterStruct: true\r
88   SplitEmptyFunction: false\r
89   AfterClass: false\r
90   AfterControlStatement: true\r
91   AfterFunction: true\r
92   AfterNamespace: true\r
93   AfterUnion: true\r
94   AfterExternBlock: true\r
95   BeforeCatch: true\r
96   BeforeElse: true\r
97 # TODO: After lambda is missing in clang-format definition ATM\r
99 # The constructor initializers style to use.\r
100 # Constructor()\r
101 #    : initializer1()\r
102 #    , initializer2()\r
103 BreakConstructorInitializers: BeforeComma\r
104 #BreakInheritanceList: BeforeComma # not yet supported by VS2017\r
106 # Break after operators\r
107 # int valuve = aaaaaaaaaaaaa +\r
108 #              bbbbbb -\r
109 #              ccccccccccc;\r
110 BreakBeforeBinaryOperators: None\r
111 BreakBeforeTernaryOperators: false\r
113 # Don't break string literals\r
114 BreakStringLiterals: false\r
116 # Use the same indentation level as for the switch statement.\r
117 # Switch statement body is always indented one level more than case labels.\r
118 IndentCaseLabels: false\r
120 # Don't indent a function definition or declaration if it is wrapped after the\r
121 # type\r
122 IndentWrappedFunctionNames: false\r
124 # Align pointer to the left\r
125 # int* a;\r
126 PointerAlignment: Left\r
128 # Don't insert a space after a cast\r
129 # x = (int32)y;    not    x = (int32) y;\r
130 SpaceAfterCStyleCast: false\r
132 # Insert spaces before and after assignment operators\r
133 # int a = 5;    not    int a=5;\r
134 # a += 42;             a+=42;\r
135 SpaceBeforeAssignmentOperators: true\r
137 # Put a space before opening parentheses only after control statement keywords.\r
138 # void f()\r
139 # {\r
140 #   if (true)\r
141 #   {\r
142 #     f();\r
143 #   }\r
144 # }\r
145 SpaceBeforeParens: ControlStatements\r
147 # Don't insert spaces inside empty '()'\r
148 SpaceInEmptyParentheses: false\r
150 # The number of spaces before trailing line comments (// - comments).\r
151 # This does not affect trailing block comments (/* - comments).\r
152 SpacesBeforeTrailingComments: 1\r
154 # Don't insert spaces in casts\r
155 # x = (int32) y;    not    x = ( int32 ) y;\r
156 SpacesInCStyleCastParentheses: false\r
158 # Insert spaces inside container literals\r
159 # var arr = [ 1, 2, 3 ];    not    var arr = [1, 2, 3];\r
160 SpacesInContainerLiterals: true\r
162 # Don't insert spaces after '(' or before ')'\r
163 # f(arg);    not    f( arg );\r
164 SpacesInParentheses: false\r
166 # Don't insert spaces after '[' or before ']'\r
167 # int a[5];    not    int a[ 5 ];\r
168 SpacesInSquareBrackets: false\r
170 # Insert a space after '{' and before '}' in struct initializers\r
171 Cpp11BracedListStyle: false\r
173 # A list of macros that should be interpreted as foreach loops instead of as\r
174 # function calls.\r
175 #ForEachMacros: ['for_each_string_list_item']\r
177 # The maximum number of consecutive empty lines to keep.\r
178 MaxEmptyLinesToKeep: 1\r
180 # No empty line at the start of a block.\r
181 KeepEmptyLinesAtTheStartOfBlocks: false\r
183 # Don't sort #include's\r
184 SortIncludes: false\r
186 # Don't insert spaces after < and before > in template argument lists\r
187 # static_cast<int>(arg);\r
188 # std::function<void(int)> fct;\r
189 SpacesInAngles: false\r
191 # Indent certain blocks\r
192 MacroBlockBegin: "^BEGIN_MESSAGE_MAP|BEGIN_TEMPLATE_MESSAGE_MAP"\r
193 MacroBlockEnd: "^END_MESSAGE_MAP"\r
195 #BreakTemplateDeclarationsStyle: Yes # not yet supported by VS2017\r