-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathastylerc
75 lines (64 loc) · 1.2 KB
/
astylerc
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
# Refer to http://astyle.sourceforge.net/astyle.html for more detail
--style=allman
# int Foo(bool isBar)
# {
# if (isBar)
# {
# bar();
# return 1;
# }
# else
# return 0;
# }
--indent=spaces=4
--indent-switches
# switch (foo)
# {
# case 1:
# a += 1;
# break;
#
# case 2:
# {
# a += 2;
# break;
# }
# }
--indent-namespaces
# namespace foospace
# {
# class Foo
# {
# public:
# Foo();
# virtual ~Foo();
# };
# }
--break-blocks
# Pad empty lines around header blocks (e.g. 'if', 'for', 'while'...).
# isFoo = true;
#
# if (isFoo) {
# bar();
# } else {
# anotherBar();
# }
#
# isBar = false;
--pad-oper
# Insert space padding around operators
# if (foo == 2)
# a = bar((b - c) * a, d--);
--pad-header
# Insert space padding between a header (e.g. 'if', 'for', 'while'...) and the following paren
# if (isFoo((a+2), b))
# bar(a, b);
--align-pointer=type
# char* foo1;
# char& foo2;
# String^ s1;
--add-brackets
# Add brackets to unbracketed one line conditional statements (e.g. 'if', 'for', 'while'...).
--close-templates
# Stack<int,List<int>> stack1;
--lineend=linux