struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sundling <>
Subject Re: maven checkstyle report
Date Sat, 10 Jan 2004 22:57:53 GMT
Actually, I was realizing that Option 2 is only a quick fix, not a 
solution and that eventually there will still be a bunch of tab errors.  
Realizing that we'll be accepting code from people who may or may not be 
using tabs, it's likely to be a persistant error...  Some assistance 
could be provided by an ant target like this that I used to package my 
own code for a client who hated tabs:

    <target name="notabs"  description="Replace tab with 4 spaces" >
        <replaceregexp match="\t"
            replace="    "
            flags="g" >
            <fileset dir="web" excludes="**/images/*" />

Even that assumes a tab is always the same number of spaces, which is 
the whole issue with tabs in the first place.  I personally like tabs, 
but not as much as I like consistency. :)


Joe Germuska wrote:

>> 2. Tab errors:  It has an error for tabs in the files.  Option 1  we 
>> remove the tabs check from checkStyle.
>>  Option 2  we replace tabs with spaces and do a quick visual check to 
>> see how everything lines up.
>> Which approach to take here isn't  as obvious.  How important is it 
>> wether there are tabs or spaces?  That's not really my call, but I'm 
>> willing to take care of it either way.
> This is the stuff religious wars are made of; it is true, though, 
> things like diff work much better if indentation is done consistently, 
> whichever character is used.  I don't recall if there's an official 
> preference in Struts, but I imagine someone will pipe in if it's 
> important to them.
> If it turns into a big debate, better to disable the tabs check, 
> because as you say, it'll improve the signal-to-noise ratio in the 
> checkstyle reports.
> Joe

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message