Hello Jeffrey,
well, the answers which come to my mind are :
- checkstyle should be changed to support a sourcepath if it does not
support a sourcepath yet,
- the workaround is to copy your n folders of source code into one
staging area, and run checkstyle against this staging area where you
would have one fileset.
My guess is that checkstyle was created with the use case in mind of
reporting on one project or source folder at at a time only, not to make
a consolidated report about a number of projects or source folders which
is what you seem to want to do.
Regards,
Antoine
Dever, Jeffrey wrote:
I have a definition for my sourcepath as a path task and wish to use
this in several places in my build, including where I need a fileset
type. I have several sub projects that are similar so I am trying to
keep the targets generic and parameterize the sub projects as much as
possible. One of these areas is where the project defines the source
path locations - each sub project has some differences in where the
sources are located, so I have these defined as a path like:
<path id="project.sourcepath">
<path location="src" />
<path location="test" />
</path>
I can pass project.sourcepath directly to some tasks, like javac, which
is fine, but some other targets such as checkstyle require a fileset. I
thought that using pathtofileset from ant-contrib would solve my
problem, but when I do the conversion the resulting fileset doesn't have
any files in it.
<pathtofileset dir="${basedir}" pathrefid="project.sourcepath"
name="project.sourcefileset" />
<checkstyle config="checks.xml">
<fileset refid="project.sourcefileset" /> <!-Problem: doesn't contain
any files! -->
</checkstyle>
I would expect that this is a common problem, but can't find a generic
solution. Ideally I could give the fileset an includes="**/*.java" but
that isn't permitted when using a refid.
Any suggestions on how to get a tree of source files from the source
path?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]