keil5中应用Astyle

    当软件工程师经常要和别人配合写代码,当大家的coding风格不一样的时候,代码移植会变得比较痛苦。偶然间在网上发现的了keil兼容Astyle的文章,于是搞了一搞,可读性比之前好多了,谢谢各位大侠。

    keil5使用Astyle的流程如下:

    https://blog.csdn.net/u010160335/article/details/78587411

按照这个帖子可以配置使用,另外可以根据下面的文档配置自己的风格

    http://astyle.sourceforge.net/astyle.html  

无奈我是一个比较懒的人,直接copy了别人的设置,发现跟我预想的差不多(哎,还是懒),于是直接用了,收纳如下

Astyle Current File

-n !E --style=allman --indent=spaces=4 --indent-preproc-block --pad-oper --pad-header --unpad-paren --suffix=none --align-pointer=name --lineend=linux --convert-tabs --delete-empty-lines --break-blocks -p -U --break-elseifs --verbose

 

Astyle All Files

$E*.c $E*.h --style=allman --indent=spaces=4 --indent-preproc-block --pad-oper --pad-header --unpad-paren --suffix=none --align-pointer=name --lineend=linux --convert-tabs --delete-empty-lines --break-blocks -p -U --break-elseifs --verbose

 

 

你可能感兴趣的:(keil5中应用Astyle)