Closed nedbass closed 6 years ago
We could consider adopting the Linux kernel coding style. I find it to be a good readable style, and a nice benefit would be that there's already a checkpatch.pl script for automated compliance checks.
The Linux kernel style looks fine to me.
I'm in favor of picking any style that has a tool to auto-apply the style, like astyle or clang-format. Does the checkpatch.pl script also apply the style?
4 spaces not 8!
We currently have a mix of formatting styles in the code. Let's choose a standard for things like spaces vs. tabs, level of indentation, column width, formatting of comment blocks, placement of curly braces, etc. The convention can ultimately be checked and/or enforced with a style checking script run from a make target and as part of an automated CI test suite. There is a placeholder in the contributing guidelines for a link to style guidelines once they are written.