On 06/03/2015 11:07 AM, Kugan wrote:
On 03/06/15 16:39, Virendra Kumar Pathak wrote:
Hi Linaro Toolchain Group,
Is there any tool for checking coding style of the patches submitted to the Linaro Toolchain ? In other word is there any equivalent of Linux checkpatch.pl http://checkpatch.pl in Linaro Toolchain (GCC, Binutils etc) ? If yes, please let me know.
If not, then in general how people check the coding style of the patches they submit to Linaro Toolchain (GCC, Binutils etc). I assume manual inspection (line by line) may be very tedious thing to do.
Toolchain related patches go through the upstream review process first and gets committed there before being back-ported to Linaro branches. Therefore they follow the same coding standard requirement of the upstream project. You can refer to the upstream project's coding standard and associated scripts. For gcc, in the contrib directory there is a script called check_GNU_style.sh which can help to some extend.
People have been pointing at clang-format recently but AFAIK support for GNU formatting (used in GCC and Binutils) is still infant.
-Y