We have a coding style which says, "Use no more than one statement per line" and "Excluding opening braces, the body of iteration-statements and of selection-statements are to begin on different lines than the statement's condition and, in the case of a do-while
loop, the do
." How do I enforce these style rules?
Edit: The program in question is written in C++. Thanks. Also, We are currently using visual inspect and grep
to find ;
followed by any non-whitespace character before the end of the line; as You might imagine, this approach can be rather tedious.