I totally agree on this. Especially forcing the formatting in Eclipse makes the code very uniform. We use the same setup at Topicus and it works extremely well. I don't really care about the actual style itself, as long as it is readable. Wicket's formatting seems like a sane choice to me.
I don't know if it is possible to let the Maven Eclipse plugin configure these settings. If so, that would be my choice. At Topicus we use svn:externals to add the same settings directory to every project. I don't know if this possible with git. Best regards, Emond Papegaaij On Thursday 07 April 2011 08:04:44 Attila Király wrote: > Hi! > > Starting this discussion because as it turned out there is a need among the > committers to establish a common code formatting in wicketstuff. [1] So > maybe it is time to have a bit of brainstorming about it. How to do it? > What should it cover? What do you think? > > Having a common code formatting would ease the cross work between the > wicketstuff projects. Currently it is very inconsistent not just between > modules but a lot of time inside a project too. > > Imho: > > We should simply adopt wicket's style (formatting + Save Actions) for the > whole wicketstuff project. Not because I like that style of formatting that > much (as every dev I also have a different opinion about The True > Formatting Rule :)) but it is consistent and wicket is the upstream > project so (probably) most of the wicketstuff commiters are used to it. > > For js, xml, html, css files we should use the same indentation style as > for the java files. So in case we adopt wicket's style we should use tabs > in these files too. > > We can add the eclipse prefs to git so it gets configured automatically. Do > not know how to do it for other IDE-s. > > If we add this I do not think that we should reformat all projects at once. > Only to do it when we touch a project or file. A complete reformat could > make it harder to dig in the version history of the files. > > > Attila > > > > [1] topic originally started here: > https://github.com/wicketstuff/core/commit/2d4ed55267cfee38fcdf33b89810edc0 > 48f766f1#comments