1.版本
Artistic Style Version 2.03
2.范例
astyle --style=ansi -j -k3 -W3 -n -U -H -p -f -x */*.cpp
3.范例说明
-j : 单行的条件加入{}
-W3: eg char &p;
-U : 移除括号两边不必要的空格
-D:Insert space padding around parenthesis on the inside only.在括号的内部加入空格,我的代码风格中不加入该选项。
-c:Convert tabs to the appropriate number of spaces.
-H: Insert space padding after paren headers charity 在if、for后加入空格。
-p :Insert space padding around operators. 操作符间加空格。
-n :不备份源文件。
-f: Insert empty lines around unrelated blocks, labels, classes, ... 不相关的文件加入空格