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


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

        

Reply via email to