FWIW, I’ve started to use the braces everywhere philosophy myself. It’s just easier for me to understand the code that way. In some cases though, when a function body is tiny, I’ll drop back to the bracelessness :), but I’m even starting to drop that.
I have no opinion on coding style other than I contribute code to a lot of different projects. I’m not going to be switching my coding style as I go from one to the other. But I always try to make my code look clean and understandable for the next person
who comes along.
Doug.
I am ok with braces rules proposed by Sergey
Regarding Java formatter, we are tools guys, lets fix Java formatter then. Sergey do you have bugs open for JDT?
I agree to set length to 132. Having length as 80 really does not work with DSF callbacks style (when we can switch to java 8 btw?).
But I personally would not enforce any of these rules above in code reviews.
The only real things I am concerned on code reviews are:
- copyright comments and general comments
- indentation of statements in the same code block (if I see indentation is off on code review screen I would not like to accept it, usually it is caused by mixing tabs and spaces)
- if somebody start using weird naming conventions (like c-style method name get_me_something_1)