From: Rod J. <rod...@in...> - 2003-03-02 12:02:13
|
Tony, Could we use this to put in a new standard header, as the existing one is out of date? Yann is producing a new header. Regards, Rod ----- Original Message ----- From: "Tony Falabella" <ton...@ya...> To: "Rod Johnson" <rod...@in...>; <spr...@li...> Sent: Friday, February 28, 2003 3:59 PM Subject: Re: [Springframework-developer] Code formatting tools > > I will make a beautify template and change Ant script to incorporate formatting to our template. Should have this done by early week (hopefully Monday). > Rod Johnson <rod...@in...> wrote:Tony, > > Using such a beautifier would definitely be valuable. One of the most > important benefits would be that diffs are guaranteed to be meaningful, as > you point out. Also each developer could reformat files they work on in > their IDE to their preferred conventions before committing in our standard > way. > > All developers should run Ant before doing a CVS check in to ensure that the > test suite succeeds, so I think it's fine to have the formatting applied via > Ant. > > I haven't used Jalopy. However, I did look around online a couple of weeks > ago for work and it seemed like a good tool. > > Would you like to try to produce a Jalopy config file and send it too me > with a modified build.xml so that I can look at the results? > > Yann is producing a coding conventions document, but I imagine > beautification will only affect things we already all agree on. Basically I > would like to keep the canonical version of the source formatted as now. > > My preferences: > - Formatting with { on same line, but a new line for a catch, as presently > in source code > - ordering and delimitation as described in chapter 4 and applied in most > source. //-----------Implementation of X interface might be hard to do, > though. I assume if the developer had already put that in Jalopy wouldn't > necessarily completely reorder the file? > - I prefer tabs but most people prefer spaces, so I guess Jalopy could > settle on (3?) spaces, as they're allegedly better for CVS diffs > > In general I think we should follow ordering conventions as we write code, > so maybe we don't want Jalopy to change that. > > I think CVS triggers are generally agreed not to work. > > Regards, > Rod > > > Just wanted to bounce this off of you and the group. What do you think of > the developers using a code beautification tool before checking anything > into the repos? > > > > One of the things I'm struggling with is I am very carefree when I code > with my indentation. Why? I use a code beautifier before I save my code. > When making modifications to the framework however, it is not a good idea to > run classes I'm changing through a code beautifier because it will shuffle > things around from what they were so much that it will be difficult to see > the small diffs that might have been made to a file. > > > > Here's my suggestion. Integrate Jalopy > (http://sourceforge.net/projects/jalopy) into the ANT build scripts either > when a build is done, or when the tests are run. Jalopy is opensource, is > very configurable, and has pluggins for all the major IDEs and ANT. A very > nice feature is that you can save the formatting configuration you like for > it in an XML file that you would then distribute with the build file. > Assuming all developers run ANT before checking things into CVS, their files > will all conform to the format you like. (It also allows for putting > separator lines for things like constructors, static vars, instance vars, > etc - as you seem to advocate in your book). > > > > This will make it a lot easier to see minor changes that are made from > each iteration of code checked in. > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |