|
There's a difference between style guides, like this, and standards, like MISRA. Style is concerned with the appearance of the code, and is largely subjective. Many languages, like Common Lisp and Java, have got this nailed: the same style is used everywhere. In the C world, there are endless arguments about levels of indentation, the position of braces, etc. Standards ensure that good, safe, coding practices are followed. For C, these are needed for many applications because the language is weakly typed and inherently unsafe in many ways. Other languages, such as Ada, have safety built into the language. |
https://www.usenix.org/conference/hotdep12/workshop-program/...
He presents a compelling case for why you should use automated tools to check compliance against coding standards (the standards don't do you any good otherwise).
As far as style goes, pipe your code through indent if you have hangups about formatting. That way you can spend your time on issues that are known to be correlated with risk.