<< Back to previous view

[QB-1237] Improve PMD reports fixed/not fixed/new violations calculation
Created: 20/Mar/12  Updated: 23/Apr/12

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0.36

Type: Improvement Priority: Major
Reporter: Steve Luo Assigned To: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown


 Description   
Sometimes, to fix a violation, simply add one line code, but PMD report will show me a lot of fixed, and a lot of new violated, actually, it should be only one fixed and leave others as not fixed. The current PMD report is very confusing for the user.

 Comments   
Comment by Steve Luo [ 23/Mar/12 02:00 PM ]
An instanceId is introduced to PMD report which is the a MD5 digest hex calculating from code line(s) and file name reported by PMD. But this still can't resolve all of the cases. For example, PMD report line 31 to 288 is violated rule1, and report line 35 is violated rule2, when we fix rule2 by changing code 35, rule1 will report as fixed and added, as the digest for 31 to 288 is different with previous build.

Anyway, this resolution can correct a lot of miss reporting by current version.

Another more complex resolution is to use the SCM information to know which line(s) were changed from previous build, but it would be too complex and I don't think it is worth to do so.

We may also remove fixed/not fixed/added section if our user complains the section is too confused even using the new algorithm.
Comment by Steve Luo [ 11/Apr/12 02:55 PM ]
The instance id is calculated incorrect due to wrong line number used.
Generated at Sat Oct 04 20:04:40 UTC 2025 using JIRA 189.