--style=stroustrup
--pad-oper # -p 操作符前后填充空格
--pad-comma #逗号间插入空格(--pad-oper中已有此效果)
--align-pointer=type #指针紧贴类型 type middle name
--align-reference=name #引用紧贴变量
--attach-return-type-decl #返回类型紧贴符号名
--attach-closing-while #(while紧贴)
#--add-braces #在'if', 'for', 'while'等句块中只有一行也加入大括号
--remove-braces # -xj 在'if', 'for', 'while'等句块中只有一行去除大括号
--convert-tabs #将TAB符转化成空格,由转化参数指定,引号内的不转化
--indent=spaces=4 # 缩进采用4个空格
--indent=tab=4 # 缩进采用4个空格
--indent-switches # -S 设置 switch 整体缩进
--indent-cases # -K 设置 cases 整体缩进
--indent-namespaces # -N 设置 namespace 整体缩进
--indent-preproc-block #缩进#开头的处理语句
--indent-preproc-cond #预处理语句也缩进
--indent-col1-comments #注释也缩进
#delete-empty-lines # -xe 删除多余空行
自定义AStyle工具格式化
最新推荐文章于 2023-07-11 21:30:00 发布