On Jun 3, 2015, at 9:39 AM, Virendra Kumar Pathak kumarvir.pathak@gmail.com 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 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.
Linaro toolchain follows upstream toolchain projects coding style, which is GNU Coding Standard. There is no checker for it that I know of, but you can use "indent" to format your code according to the style, see [1].
Note, that in Linaro Toolchain, like in most Linaro projects, upstream comes first -- in our case this means that we only have patches in our toolchain that are committed or approved upstream. E.g., improvement committed to upstream trunk (gcc-6) is appropriate to be included into Linaro's gcc-5 branch; but a patch rejected for upstream trunk will not make it into Linaro's toolchain.
For the above reason you may need to consider submitting your changes directly to upstream toolchain projects. You can still CC us on such a submission and ask us to review it or help otherwise.
[1] http://stackoverflow.com/questions/411249/coding-style-checker-for-c
Thank you,
-- Maxim Kuvyrkov www.linaro.org