From e2d6325841985954e8982ffdf27dc8b212ef981d Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Tue, 24 Jan 2023 10:17:49 +0100 Subject: [PATCH] Update dependencies --- docs/report-examples/html-report-v2.html | 30 ++++++++++++++++++------ pmd-core/etc/xslt/html-report-v2.xslt | 23 ++++++++++++------ 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/docs/report-examples/html-report-v2.html b/docs/report-examples/html-report-v2.html index 8b63d28439..ba363c6c9a 100644 --- a/docs/report-examples/html-report-v2.html +++ b/docs/report-examples/html-report-v2.html @@ -4,14 +4,14 @@ PMD Report - - + +
-
Problems found :: Version: 6.53.0 @ 2023-01-23T16:28:11.495
+
Problems found :: Version: 6.53.0 @ 2023-01-24T10:02:08.431
@@ -1102,16 +1102,31 @@ 'Error Prone': 0, 'Multithreading': 0, 'Performance': 0, - 'Security': 0 + 'Security': 0, + 'Other': 0 }; + function mapCategory(rulesetName) { + switch (rulesetName.toLowerCase()) { + case 'best practices': return 'Best Practices'; + case 'code style': return 'Code Style'; + case 'design': return 'Design'; + case 'documentation': return 'Documentation'; + case 'error prone': return 'Error Prone'; + case 'multithreading': return 'Multithreading'; + case 'performance': return 'Performance'; + case 'security': return 'Security'; + } + return 'Other'; + } + let rows = $('#pmdTable tbody tr'); let total = rows.length; rows.each(function() { let priority = $("td", this).slice(4, 5).text(); priorityCounter[priority]++; - let category = $("td", this).slice(5, 6).text(); - categoryCounter[category]++; + let rulesetName = $("td", this).slice(5, 6).text(); + categoryCounter[mapCategory(rulesetName)]++; }); const summaryEle = document.getElementById('summary'); @@ -1156,7 +1171,8 @@ {"category": "Error Prone", "count": categoryCounter['Error Prone']}, {"category": "Multithreading", "count": categoryCounter['Multithreading']}, {"category": "Performance", "count": categoryCounter['Performance']}, - {"category": "Security", "count": categoryCounter['Security']} + {"category": "Security", "count": categoryCounter['Security']}, + {"category": "Other", "count": categoryCounter['Other']} ] }, "mark": {"type": "arc" , "innerRadius": 50, "tooltip": true}, diff --git a/pmd-core/etc/xslt/html-report-v2.xslt b/pmd-core/etc/xslt/html-report-v2.xslt index 5d248b7ed1..824766ef19 100644 --- a/pmd-core/etc/xslt/html-report-v2.xslt +++ b/pmd-core/etc/xslt/html-report-v2.xslt @@ -10,17 +10,26 @@ xmlns:scan="http://pmd.sourceforge.net/report/2.0.0"> PMD Report - - -