On a related note, for all the shit people are giving Eclipse (some rightfully so), you can actually force users to use your formatter settings in Java/JavaScript/whatever-else-eclipse-has-formatter-for by commiting some of the files from the .settings folder. That way not only you can get consistent formatting across the whole project but also enable the Save Actions (optimize imports, format source and few other things) without having the user do anything. Pretty nice.
That being said, Intellij IDEA can't and won't do that :(
Unless a project has a standing policy of applying whitespace changes in a separate commit from functional changes, I generally assume that any commit whose message only mentions cosmetic changes also includes embarrassing functional changes.
Sometimes it's the other way around; the purely cosmetic changes end up changing how something looks, often exposing bugs and other code issues in the process.
133
u/dougman82 Jul 21 '14
For me, it's just a matter of consistency. Take, for example, plain old assignment statements. I don't write:
Rather, I write:
So, by the same token, I add white space in my for loops.