-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
.astylerc
92 lines (73 loc) · 1.78 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# For full docs:
# http://astyle.sourceforge.net/astyle.html
#
# General Options:
# - Only display errors
# - Redirect stderr to stdout
# - Enforce linux lineendings
# - Preserve file modification date
# - Do not create file backups, everything should be VCSed anyway
--quiet
--errors-to-stdout
--lineend=linux
--preserve-date
--suffix=none
# Style
#
# bsd:
# int main(void)
# {
# if (true)
# {
# return 0;
# }
# }
#
# kr:
# int main(void)
# {
# if (true) {
# return 0;
# }
# }
--style=kr
# Indent with 4 spaces, convert tabs to spaces
--indent=spaces=4
--convert-tabs
# Attach brackets to extern c: `extern "C" {`
--attach-extern-c
# Attach brackets to namespaces: `namespace foo {`
--attach-namespaces
# Indent preprocessor blocks, and defines
--indent-preproc-block
--indent-preproc-define
# All comments have to be properly indented
--indent-col1-comments
# Do not indent conditionals
--min-conditional-indent=0
# Indent statements to be aligned up to 40 cols
--max-instatement-indent=40
# Paddings around operators, parentheses, and a header
# (header means `if`, `while`, etc. Example: `if (true)`, instead of `if(true)`)
--pad-oper
--pad-header
# Do I like this? No, I don't.
# Pad parens, and remove all not requested padding
#--pad-paren-in
#--unpad-paren
# doesn't seem to preserve any lines, will just remove any empty lines!
# --delete-empty-lines
# Pointer alignment
--align-pointer=name
--align-reference=name
# Break elseifs / closing brackets
# might be useful with style=kr
#--break-closing-brackets
#--break-elseifs
# Make sure to always add brackets to if,for,while etc statements
# we do not want to repeat goto fail;
--keep-one-line-blocks
--keep-one-line-statements
# Obvious 80 col length maximum
--max-code-length=80
--break-after-logical