我是靠谱客的博主 顺心小刺猬,这篇文章主要介绍astyle配置说明,现在分享给大家,希望可以做个参考。

1.版本

Artistic Style Version 2.03

2.范例

astyle --style=ansi -j -k3 -W3 -n -U -H -p -f -x */*.cpp


3.范例说明


    -j :  单行的条件加入{}

     -k3 : eg:char 
*p; 

     -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, ... 不相关的文件加入空格



最后

以上就是顺心小刺猬最近收集整理的关于astyle配置说明的全部内容,更多相关astyle配置说明内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(104)

评论列表共有 0 条评论

立即
投稿
返回
顶部