Foreword测试一下目前常用的一些代码格式化的工具,后续将其引入到CI流程中FormatArtistic StyleAstyle,一个经典代码格式化的工具,在一些比较老的编译器或者是嵌入式中用的比较多https://astyle.sourceforge.net/本身支持命令行直接调用,所以很适合集成到一些CI流程中Usage:
------
astyle [OPTIONS] File1 File2 File3 [...]
astyle [OPTIONS] < Original > Beautified
When indenting a specific file, the resulting indented file RETAINS
the original file-name. The original pre-indented file is renamed,
with a suffix of '.orig' added to the original filename.
Wildcards (* and ?) may be used in the filename.
A 'recursive' option can process directories recursively
...
继续阅读
(43)