Adrian,

I don't understand what you mean by "OFBiz servers are spewing out unnecessary stuff". Those FTLs with unnecessary whitespaces are probably coded that way (by mistake or otherwise), not generated and spewed by some servers.

As for indentation, I recall the "best practices" page for contributors stating that all tabs should be converted to spaces. That's quite the norm in many, if not all, projects. You mean you found tabs in FTL sources?

In any case, all these don't affect me. Use Emacs! I don't remove or change any whitespaces, not even change tabs to spaces.

Far as I'm concerned, I will continue to submit patches that have "intended changes only". I'm kinda obsessive compulsively clean and organized. I'd rather have say the original authors clean up the extra whitespaces, and check in with log saying "cleaned up whitespaces". My check in log will only be "fixed this bug", not "fixed this bug, plus cleaned up whitespaces".

But yeah, your editor isn't wrong to clean up those whitespaces. No wait. It's wrong. Or at least it's wrong not to allow you to configure that behavior.

Jonathon

Adrian Crum wrote:
After spending some time examining the unintentional formatting changes in my patch files, I discovered that my editor automatically strips off unnecessary white space at the end of every line. I can't find a way to shut it off, so I'll have to switch to another IDE.

At first I was upset that my editor would do such a thing without my permission. Then I got to thinking that it makes a lot of sense. Less unnecessary white space equals less fluff the compiler has to trudge through and less fluff in HTML code.

Hey! Wait a second... many of those files that were unintentionally formatted were FTL files. Does that mean that OFBiz servers are spewing out unnecessary fluff? I viewed the page source on a typical OFBiz web page and sure enough - OFBiz's markup has unnecessary white space at the end of the lines.

Going through all of the FTL files and cleaning them up would be easy to do with a script or something, but the reduction in HTML output would be small. Where I see a huge amount of unnecessary markup is with indentation. Our four character indentation rule results in things like a simple </div> tag being preceded by twelve to sixteen space characters. Our servers are working very hard to output nicely indented markup.



Reply via email to