Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.7
-
Fix Version/s: 2.7
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
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()); }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
-
Activity
Dennis Lundberg
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Dennis Lundberg [ dennislundberg ] | |
| Fix Version/s | 2.7 [ 16773 ] | |
| Resolution | Fixed [ 1 ] |
Herve Boutemy
made changes -
| Link |
This issue is superceded by |
Apologies for the poor formatting, here's the function again.
public boolean canGenerateReport() { // TODO: would be good to scan the files here return sourceDirectory.exists() || (includeTestSourceDirectory && testSourceDirectory.exists()); }