Fixed issue #4141: Cannot remove remote: "usage: git remote remove <name>"
[TortoiseGit.git] / src / .clang-format
blob68553217fbfadcebcf4e2a4feed7e16bc56d804c
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 # But allow short lambdas on a single line\r
64 AllowShortLambdasOnASingleLine: All\r
66 # By default don't add a line break after the return type of top-level functions\r
67 # int foo();\r
68 AlwaysBreakAfterReturnType: None\r
70 # Pack as many parameters or arguments onto the same line as possible\r
71 # int myFunction(int aaaaaaaaaaaa, int bbbbbbbb,\r
72 #                int cccc);\r
73 BinPackArguments: true\r
74 BinPackParameters: true\r
76 # Attach braces to surrounding context except break before braces on function\r
77 # definitions.\r
78 # void foo()\r
79 # {\r
80 #    if (true)\r
81 #    {\r
82 #    }\r
83 #    else\r
84 #    {\r
85 #    }\r
86 # };\r
87 BreakBeforeBraces: Custom\r
88 BraceWrapping:\r
89   AfterEnum: true\r
90   AfterStruct: true\r
91   AfterCaseLabel: true\r
92   SplitEmptyFunction: false\r
93   AfterClass: true\r
94   AfterControlStatement: true\r
95   AfterFunction: true\r
96   AfterNamespace: true\r
97   AfterUnion: true\r
98   AfterExternBlock: true\r
99   BeforeCatch: true\r
100   BeforeElse: true\r
101   #BeforeLambdaBody, not supported by VS2019\r
103 # The constructor initializers style to use.\r
104 # Constructor()\r
105 #    : initializer1()\r
106 #    , initializer2()\r
107 BreakConstructorInitializers: BeforeComma\r
108 BreakInheritanceList: BeforeComma\r
110 # Break after operators\r
111 # int valuve = aaaaaaaaaaaaa +\r
112 #              bbbbbb -\r
113 #              ccccccccccc;\r
114 BreakBeforeBinaryOperators: None\r
115 BreakBeforeTernaryOperators: false\r
117 # Don't break string literals\r
118 BreakStringLiterals: false\r
120 # Re-check: IndentCaseBlocks (not supported in VS2019)\r
122 # Use the same indentation level as for the switch statement.\r
123 # Switch statement body is always indented one level more than case labels.\r
124 IndentCaseLabels: false\r
126 # Don't indent a function definition or declaration if it is wrapped after the\r
127 # type\r
128 IndentWrappedFunctionNames: false\r
130 # Align pointer to the left\r
131 # int* a;\r
132 PointerAlignment: Left\r
134 # Don't insert a space after a cast\r
135 # x = (int32)y;    not    x = (int32) y;\r
136 SpaceAfterCStyleCast: false\r
138 # Insert spaces before and after assignment operators\r
139 # int a = 5;    not    int a=5;\r
140 # a += 42;             a+=42;\r
141 SpaceBeforeAssignmentOperators: true\r
143 # Put a space before opening parentheses only after control statement keywords.\r
144 # void f()\r
145 # {\r
146 #   if (true)\r
147 #   {\r
148 #     f();\r
149 #   }\r
150 # }\r
151 SpaceBeforeParens: ControlStatements\r
153 # Don't insert spaces inside empty '()'\r
154 SpaceInEmptyParentheses: false\r
156 # The number of spaces before trailing line comments (// - comments).\r
157 # This does not affect trailing block comments (/* - comments).\r
158 SpacesBeforeTrailingComments: 1\r
160 # Don't insert spaces in casts\r
161 # x = (int32) y;    not    x = ( int32 ) y;\r
162 SpacesInCStyleCastParentheses: false\r
164 # Insert spaces inside container literals\r
165 # var arr = [ 1, 2, 3 ];    not    var arr = [1, 2, 3];\r
166 SpacesInContainerLiterals: true\r
168 # Don't insert spaces after '(' or before ')'\r
169 # f(arg);    not    f( arg );\r
170 SpacesInParentheses: false\r
172 # Don't insert spaces after '[' or before ']'\r
173 # int a[5];    not    int a[ 5 ];\r
174 SpacesInSquareBrackets: false\r
176 # Insert a space after '{' and before '}' in struct initializers\r
177 Cpp11BracedListStyle: false\r
179 # A list of macros that should be interpreted as foreach loops instead of as\r
180 # function calls.\r
181 #ForEachMacros: ['for_each_string_list_item']\r
183 # The maximum number of consecutive empty lines to keep.\r
184 MaxEmptyLinesToKeep: 1\r
186 # No empty line at the start of a block.\r
187 KeepEmptyLinesAtTheStartOfBlocks: false\r
189 # Don't sort #include's\r
190 SortIncludes: false\r
192 # Don't insert spaces after < and before > in template argument lists\r
193 # static_cast<int>(arg);\r
194 # std::function<void(int)> fct;\r
195 SpacesInAngles: false\r
197 # Indent certain blocks\r
198 MacroBlockBegin: "^BEGIN_MESSAGE_MAP|BEGIN_TEMPLATE_MESSAGE_MAP"\r
199 MacroBlockEnd: "^END_MESSAGE_MAP"\r
201 #BreakTemplateDeclarationsStyle: Yes # not yet supported by VS2017\r