From 70070295b7d9b8746a84400838a97a32dc792614 Mon Sep 17 00:00:00 2001
From: Andreas Dangel
Date: Sat, 14 Mar 2015 14:40:00 +0100
Subject: [PATCH] maven-plugin-pmd-build: Output also deprecated rules that are
no references.
---
.../src/main/resources/xslt/rule-format.xsl | 8 +++++++-
.../src/main/resources/xslt/rules-index.xsl | 10 ++++++++--
.../net/sourceforge/pmd/build/RuleSetToDocsTest.java | 2 ++
.../src/main/resources/rulesets/java/codesize.xml | 5 +++++
4 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/maven-plugin-pmd-build/src/main/resources/xslt/rule-format.xsl b/maven-plugin-pmd-build/src/main/resources/xslt/rule-format.xsl
index 96c2472b72..f9ff3548e9 100644
--- a/maven-plugin-pmd-build/src/main/resources/xslt/rule-format.xsl
+++ b/maven-plugin-pmd-build/src/main/resources/xslt/rule-format.xsl
@@ -34,7 +34,7 @@
-
+
@@ -50,6 +50,12 @@
:
+
+
+ border-radius: 3px; border-style: solid; border-width: 1px 1px 1px 5px; margin: 20px 0px; padding: 20px; border-color: #eee; border-left-color: #ce4844
+ Deprecated
+
+
diff --git a/maven-plugin-pmd-build/src/main/resources/xslt/rules-index.xsl b/maven-plugin-pmd-build/src/main/resources/xslt/rules-index.xsl
index 0765a93d51..5c4f440ae7 100644
--- a/maven-plugin-pmd-build/src/main/resources/xslt/rules-index.xsl
+++ b/maven-plugin-pmd-build/src/main/resources/xslt/rules-index.xsl
@@ -53,12 +53,18 @@
-
+
- :
+ :
+
+
+ Deprecated rule.
+
+
+
diff --git a/maven-plugin-pmd-build/src/test/java/net/sourceforge/pmd/build/RuleSetToDocsTest.java b/maven-plugin-pmd-build/src/test/java/net/sourceforge/pmd/build/RuleSetToDocsTest.java
index 63f4993d3f..2a016125d8 100644
--- a/maven-plugin-pmd-build/src/test/java/net/sourceforge/pmd/build/RuleSetToDocsTest.java
+++ b/maven-plugin-pmd-build/src/test/java/net/sourceforge/pmd/build/RuleSetToDocsTest.java
@@ -42,6 +42,8 @@ public class RuleSetToDocsTest extends TestBase {
assertTrue(codeSizeRuleset.contains("NPathComplexity"));
assertTrue(codeSizeRuleset.contains("JumbledIncrementer"));
assertTrue(codeSizeRuleset.contains("JumbledIncrementer"));
+
+ assertTrue(codeSizeRuleset.contains("SoonToBeRemoved"));
}
@Test
diff --git a/maven-plugin-pmd-build/src/test/resources/sample-pmd/src/main/resources/rulesets/java/codesize.xml b/maven-plugin-pmd-build/src/test/resources/sample-pmd/src/main/resources/rulesets/java/codesize.xml
index af80802171..339289ada9 100644
--- a/maven-plugin-pmd-build/src/test/resources/sample-pmd/src/main/resources/rulesets/java/codesize.xml
+++ b/maven-plugin-pmd-build/src/test/resources/sample-pmd/src/main/resources/rulesets/java/codesize.xml
@@ -58,4 +58,9 @@ void bar() { // this is something more complex than it needs to be,
+
+
+ This rule will be removed with the next version.
+ 3
+
\ No newline at end of file