On Mar 28, 2012, at 2:13 PM, Johann Werner wrote:
Perhaps now it is the time to define a mandatory Wonder code formatter all commits have to use. I think that would make it easier for many committers to send patches without worrying about formatting – and it would improve the code readability/quality.
Code formatting can turn into a religious war. Lots of fervent belief, with little evidence to back it up.
I _love_ how I format my code. I've had other's heads explode when they look at it. (Hi Dawn!)
WIth that said, I think some basics would certainly be helpful, and it's easy to create a set of formatting rules that can be imported into Eclipse.
I'd say #1 change that would make the code easier for me to read is no freakin' conditionals in the return statement.
return contentDisposition != null && (contentDisposition.indexOf("inline") > -1 || contentDisposition.indexOf("attachment") > -1);
Seriously, who can read that and make sense of it immediately?!