forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject Re: Automated formatting of XML files
Date Sat, 27 Aug 2005 00:15:17 GMT
Thorsten Scherler wrote:
> Diwaker Gupta wrote:
> > Thorsten Scherler wrote:
> > > Can't we have *one* thread for that?
> > 
> > I created two threads simply because of convinience. XML and Java will
> > use different cleanup tools with a different set of configurations.
> > They have different syntaxes and different types of cleanups we might
> > want. So I just thought it would be easier for people to focus on one
> > type of file at a time when they are giving their preferences.
> > Apparently I was wrong :-)

No, it needs the separate threads. But we should note
that on the issue tracker.

> That is perfectly alright but *maybe* a new thread with the actual
> whitespace checklist would have been better because the criteria are
> actually the same for all file.

No, the lists are not the same.

> It was not addressed to you starting two different threads.  
> > > formatting of Java files". Is there a reason to treat java seperate from
> > > other files?
> > 
> > There most certainly is.
> I understand but on the other hand why not use something like
> find . -name "*.$pattern"|grep -v "build"|grep -v ".svn" |awk '{print
> "cat "$1 " |sed 's/$find/$replace/g' > "$1".new |mv "$1".new " $1}'|sh
> that would not do the linebreaks and other formating stuff but would get
> rid of the tabs and could be used over all file extension we have. 

For the simple whitespace changes (items 1,2 in both
java and xml) which is what i am most interested in at
the moment, yes i would use a shell or perl script.

The advantage of tools like Tidy is that they could do
some extra work. Some of that might be good, but not
too much.

> IMO regardless which tool we use for the job we still need to review all
> files.

I agree. It is another job to gradually review all files.


View raw message