-
Notifications
You must be signed in to change notification settings - Fork 2
/
astyle-options.ini
153 lines (133 loc) · 2.17 KB
/
astyle-options.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# C++ Java-Stil auch Standard f�r .NET C#
--style=java
# Tabs sollten 4 Leerzeichen gro� sein
--indent=spaces=4
--convert-tabs
# case in switches sollte einger�ckt sein
#switch (foo) {
# case 1:
# a += 1;
# break;
#
# case 2: {
# a += 2;
# break;
# }
#}
--indent-switches
# Kommentare sollten nicht mit der ersten Spalte beginnen
#void Foo() {
#// comment
# if (isFoo)
# bar();
#}
#
#becomes:
#
#void Foo() {
# // comment
# if (isFoo)
# bar();
#}
--indent-col1-comments
#isFoo = true;
#if (isFoo) {
# bar();
#} else {
# anotherBar();
#}
#isBar = false;
#
#becomes:
#
#isFoo = true;
#
#if (isFoo) {
# bar();
#} else {
# anotherBar();
#}
#
#isBar = false;
--break-blocks
# genug Leerzeichen zwischen Operatoren
#if (foo==2)
# a=bar((b-c)*a,d--);
#
#becomes:
#
#if (foo == 2)
# a = bar((b - c) * a, d--);
--pad-oper
# Test: entfernte alle extra Leerzeichen zwischen den Klammern
#if ( isFoo( a, b ) )
# bar ( a, b );
#
#becomes (with no padding option requested):
#
#if(isFoo(a, b))
# bar(a, b);
--unpad-paren
# binde Zeiger und Referenzen an den Typen und nicht an die Variable
#char* foo1;
#char& foo2;
#
#becomes (with align-pointer=name):
#
#char *foo1;
#char &foo2;
--align-pointer=name
--align-reference=name
#do {
# bar();
# ++x;
#}
#while x == 1;
#
#becomes:
#
#do {
# bar();
# ++x;
#} while x == 1;
--attach-closing-while
##define Is_Bar(arg,a,b) \
#(Is_Foo((arg), (a)) \
#|| Is_Foo((arg), (b)))
#
#becomes:
#
##define Is_Bar(arg,a,b) \
# (Is_Foo((arg), (a)) \
# || Is_Foo((arg), (b)))
--indent-preproc-define
#void
#Foo(bool isFoo);
#
#becomes:
#
#void Foo(bool isFoo);
--attach-return-type
--attach-return-type-decl
#if (thisVariable1 == thatVariable1 || thisVariable2 == thatVariable2 || thisVariable3 == thatVariable3)
# bar();
#
#becomes (with break‑after‑logical):
#
#if (thisVariable1 == thatVariable1 ||
# thisVariable2 == thatVariable2 ||
# thisVariable3 == thatVariable3)
# bar();
--max-code-length=75
--break-after-logical
#if (isFoo)
# isFoo = false;
#
#becomes:
#
#if (isFoo) {
# isFoo = false;
#}
--add-braces
# keine .orig Backups
--suffix=none