I've written a custom ant task that performs Checkstyle only on modified
files. Or on files modified since some revision. 

The purpose is to gradually introduce a code quality policy on legacy
projects. 

I plan to submit a patch back, meantime if you need it *now*, then email me
(uses Checkstyle 5.0, and SVNKit 1.3.2)

Cheers. 



Wray, Nathan wrote:
> 
> Hi All;
> 
>  
> 
> I'm trying to identify modified java files in an SVN working copy and
> run checkstyle on these files.  So far I've got a property with a list
> of everything modified like:
> 
>  
> 
> /path/file1;/path/file2;/path/file3
> 
>  
> 
> It seems like I need something the opposite of pathconvert to turn this
> property into a FileSet.  
> 
> Any suggestions?  The relevant part of my build file follows:
> 
>  
> 
> <exec executable="svn" outputproperty="svn.status.out">
> 
> <arg value="status" />
> 
> <arg value="${basedir}/.." />
> 
> <arg value="--xml" />
> 
> </exec>
> 
>           
> 
> <xmlproperty prefix="svnstat" collapseattributes="true" delimiter=";">
> 
> <propertyset>
> 
> <propertyref name="svn.status.out"/>
> 
> </propertyset>
> 
> </xmlproperty>
> 
>  
> 
> <!--
> 
> Now svnstat.status.target.entry.path contains all of the modified files 
> 
> and folders as a semicolon separated list
> 
> This needs to be filtered to just .java files
> 
> -->
> 
> <echo  message="unfiltered list of modified files:
> ${svnstat.status.target.entry.path}"/>
> 
>  
> 
> <!--
> 
> This fails, the list is not a pathid
> 
> -->
> 
> <checkstyle  config="./Checkstyle.xml">
> 
> <fileset pathid="svnstat.status.target.entry.path"/>
> 
> </checkstyle>
> 
>  
> 
>  
> 
>  
> 
> Thank you
> 
> Nathan
> 
>  
> 
>  
> 
> 
> The contents of this e-mail are intended for the named addressee only. It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or
> disclose it to anyone else. If you received it in error please notify us
> immediately and then destroy it.
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Creating-a-fileset-from-a-list-of-filenames-tp26179430p27237832.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to