Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.7
-
None
-
None
-
Patch
Description
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()); }Attachments
Issue Links
- is superceded by
-
MCHECKSTYLE-144 If 'src/main/java' does not exist in a project then checkstyle skips the other source folders of the project
- Closed