struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Chen" <tc...@tampabay.rr.com>
Subject RE: maven checkstyle report
Date Mon, 12 Jan 2004 22:21:21 GMT
You can use ant pretty. Let me know if you need an example.
Very easy to use and will enforce a standard across everything not just
tabs.

Tim Chen
tchen@tampabay.rr.com


-----Original Message-----
From: Indrajit Raychaudhuri [mailto:irc@indrajit.com] 
Sent: Sunday, January 11, 2004 12:46 AM
To: Struts Developers List
Subject: Re: maven checkstyle report



----- Original Message ----- 
From: "Paul Sundling" <tomcatlist@tkz.net>
To: "Struts Developers List" <struts-dev@jakarta.apache.org>
Sent: Sunday, 11 January, 2004 04:27
Subject: Re: maven checkstyle report


> 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/*" />
>         </replaceregexp>
>     </target>
>
> Even that assumes a tab is always the same number of spaces, which is 
> the whole issue with tabs in the first place.

You could also use the Ant task <fixcrlf/>
For example (assuming Struts convention of '4 whitespaces per tab'), we
could have

<fixcrlf
         srcdir="${src.java.dir}"
         tab="remove"
         tablength="4"/>

- Indrajit



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message