2条命令搞定,最后一条命令用于检测,如果有error或者warning 根据提示再做微调。
$astyle --style=linux -z2 /path/filename
$indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1 /path/filename
$./scripts/checkpatch.pl -f /path/filename
详细的编码风格,请参考如下:
http://iyu.is-programmer.com/posts/30315.html
本文详细介绍了如何使用astyle和indent命令对代码进行风格化整理,并通过checkpatch.pl脚本检测潜在的错误或警告,确保代码质量。
597

被折叠的 条评论
为什么被折叠?



