[
http://jira.codehaus.org/browse/MCHECKSTYLE-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dennis Lundberg closed MCHECKSTYLE-153.
---------------------------------------
Resolution: Fixed
Fix Version/s: 2.7
Assignee: Dennis Lundberg
Patch applied in
[r1092498|http://svn.apache.org/viewvc?view=revision&revision=1092498].
Thanks!
New 2.7-SNAPSHOT deployed. Please test it.
> Checkstyle doesn't run on projects containing only test classes
> ---------------------------------------------------------------
>
> Key: MCHECKSTYLE-153
> URL: http://jira.codehaus.org/browse/MCHECKSTYLE-153
> Project: Maven 2.x Checkstyle Plugin
> Issue Type: Bug
> Affects Versions: 2.7
> Reporter: Bruce Mackenzie Nielsen
> Assignee: Dennis Lundberg
> Fix For: 2.7
>
>
> We discovered that if a project only contains test classes and no "normal"
> classes, the canGenerateReport() function returns false, as it only checks
> for the existence of the sourceDirectory path. If includeTestSourceDirectory
> is set to true, the function should also check for the existence of the
> testSourceDirectory path.
>
> Here's an example patch to the method:
>
> public boolean canGenerateReport()
> {
> // TODO: would be good to scan the files here
> return sourceDirectory.exists() || (includeTestSourceDirectory &&
> testSourceDirectory.exists());
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira