Astyle代码格式化
Astyle代码格式化
A Free, Fast and Small Automatic Formatter
for C, C++, C#, and Java Source Code
项目网址:http://astyle.sourceforge.net/astyle.html
Astyle可以从命令行运行,由于它用C++编写,也可以作为C++类用在C++程序中。
对于嵌入keil5中的AStyle的应用,推荐参数添加:
-p -a !E
//Attach brackets to their pre-block statements