From 05b39e34192c80d9c6f89437ce7dbadfb0c125aa Mon Sep 17 00:00:00 2001 From: Saladoc Date: Tue, 15 Oct 2019 20:08:36 +0200 Subject: [PATCH 1/3] Streamline renderer tests. Remove platform-dependent contents from the file names to prevent tests breaking on Windows systems. --- .../pmd/renderers/AbstractRendererTst.java | 2 +- .../pmd/renderers/CSVRendererTest.java | 6 +++--- .../pmd/renderers/CodeClimateRendererTest.java | 8 ++++---- .../pmd/renderers/EmacsRendererTest.java | 4 ++-- .../pmd/renderers/HTMLRendererTest.java | 18 +++++++++++------- .../pmd/renderers/PapariTextRendererTest.java | 13 +++---------- .../pmd/renderers/RenderersTests.java | 15 ++++++++++++++- .../pmd/renderers/SummaryHTMLRendererTest.java | 11 ++++++++--- .../pmd/renderers/TextPadRendererTest.java | 4 ++-- .../pmd/renderers/TextRendererTest.java | 5 +++-- .../pmd/renderers/VBHTMLRendererTest.java | 4 ++-- .../pmd/renderers/XMLRendererTest.java | 8 ++++---- 12 files changed, 57 insertions(+), 41 deletions(-) diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTst.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTst.java index 7ed01ca1c9..27ab44c70b 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTst.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTst.java @@ -53,7 +53,7 @@ public abstract class AbstractRendererTst { } protected String getSourceCodeFilename() { - return "n/a"; + return "notAvailable.ext"; } @Test(expected = NullPointerException.class) diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CSVRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CSVRendererTest.java index 844b659e8d..72ca9fdce0 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CSVRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CSVRendererTest.java @@ -18,7 +18,7 @@ public class CSVRendererTest extends AbstractRendererTst { @Override public String getExpected() { return getHeader() - + "\"1\",\"\",\"n/a\",\"5\",\"1\",\"blah\",\"RuleSet\",\"Foo\"" + PMD.EOL; + + "\"1\",\"\",\"" + getSourceCodeFilename() + "\",\"5\",\"1\",\"blah\",\"RuleSet\",\"Foo\"" + PMD.EOL; } @Override @@ -29,8 +29,8 @@ public class CSVRendererTest extends AbstractRendererTst { @Override public String getExpectedMultiple() { return getHeader() - + "\"1\",\"\",\"n/a\",\"5\",\"1\",\"blah\",\"RuleSet\",\"Foo\"" + PMD.EOL - + "\"2\",\"\",\"n/a\",\"5\",\"1\",\"blah\",\"RuleSet\",\"Foo\"" + PMD.EOL; + + "\"1\",\"\",\"" + getSourceCodeFilename() + "\",\"5\",\"1\",\"blah\",\"RuleSet\",\"Foo\"" + PMD.EOL + + "\"2\",\"\",\"" + getSourceCodeFilename() + "\",\"5\",\"1\",\"blah\",\"RuleSet\",\"Foo\"" + PMD.EOL; } @Override diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CodeClimateRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CodeClimateRendererTest.java index 5d31161523..c1046bc5b8 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CodeClimateRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CodeClimateRendererTest.java @@ -37,7 +37,7 @@ public class CodeClimateRendererTest extends AbstractRendererTst { + "Name | Value | Description\\n" + "--- | --- | ---\\n" + "violationSuppressRegex | | Suppress violations with messages matching a regular expression\\n" + "violationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\\n" - + "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"n/a\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}" + + "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"" + getSourceCodeFilename() + "\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}" + "\u0000" + PMD.EOL; } @@ -54,7 +54,7 @@ public class CodeClimateRendererTest extends AbstractRendererTst { + "violationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\\n" + "multiString | default1,default2 | multi string property\\n" + "stringProperty | the string value\\nsecond line with 'quotes' | simple string property\\n" - + "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"n/a\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}" + + "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"" + getSourceCodeFilename() + "\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}" + "\u0000" + PMD.EOL; } @@ -74,7 +74,7 @@ public class CodeClimateRendererTest extends AbstractRendererTst { + "Name | Value | Description\\n" + "--- | --- | ---\\n" + "violationSuppressRegex | | Suppress violations with messages matching a regular expression\\n" + "violationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\\n" - + "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"n/a\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}" + + "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"" + getSourceCodeFilename() + "\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}" + "\u0000" + PMD.EOL + "{\"type\":\"issue\",\"check_name\":\"Foo\",\"description\":\"blah\"," + "\"content\":{\"body\":\"## Foo\\n\\nSince: PMD null\\n\\nPriority: Low\\n\\n" + "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n" @@ -84,7 +84,7 @@ public class CodeClimateRendererTest extends AbstractRendererTst { + "Name | Value | Description\\n" + "--- | --- | ---\\n" + "violationSuppressRegex | | Suppress violations with messages matching a regular expression\\n" + "violationSuppressXPath | | Suppress violations on nodes which match a given relative XPath expression.\\n" - + "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"n/a\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}" + + "\"},\"categories\":[\"Style\"],\"location\":{\"path\":\"" + getSourceCodeFilename() + "\",\"lines\":{\"begin\":1,\"end\":1}},\"severity\":\"info\",\"remediation_points\":50000}" + "\u0000" + PMD.EOL; } diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmacsRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmacsRendererTest.java index 1914f3f1c7..5d85539711 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmacsRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmacsRendererTest.java @@ -15,7 +15,7 @@ public class EmacsRendererTest extends AbstractRendererTst { @Override public String getExpected() { - return "n/a:1: blah" + PMD.EOL; + return getSourceCodeFilename() + ":1: blah" + PMD.EOL; } @Override @@ -25,6 +25,6 @@ public class EmacsRendererTest extends AbstractRendererTst { @Override public String getExpectedMultiple() { - return "n/a:1: blah" + PMD.EOL + "n/a:1: blah" + PMD.EOL; + return getSourceCodeFilename() + ":1: blah" + PMD.EOL + getSourceCodeFilename() + ":1: blah" + PMD.EOL; } } diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/HTMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/HTMLRendererTest.java index 82d0db4e91..fa1309ea61 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/HTMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/HTMLRendererTest.java @@ -11,20 +11,24 @@ import net.sourceforge.pmd.Report.ProcessingError; public class HTMLRendererTest extends AbstractRendererTst { @Override - public Renderer getRenderer() { - return new HTMLRenderer(); + protected String getSourceCodeFilename() { + return "someFilename
thatNeedsEscaping.ext"; + } + + private String getEscapedFilename() { + return "someFilename<br>thatNeedsEscaping.ext"; } @Override - protected String getSourceCodeFilename() { - return "filename/that/needs escaping.ext"; + public Renderer getRenderer() { + return new HTMLRenderer(); } @Override public String getExpected() { return getHeader() + " " + PMD.EOL + "1" + PMD.EOL - + "filename/that/needs <script>alert(1)</script> escaping.ext" + PMD.EOL + "1" + PMD.EOL + + "" + getEscapedFilename() + "" + PMD.EOL + "1" + PMD.EOL + "blah" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL; } @@ -38,9 +42,9 @@ public class HTMLRendererTest extends AbstractRendererTst { public String getExpectedMultiple() { return getHeader() + " " + PMD.EOL + "1" + PMD.EOL - + "filename/that/needs <script>alert(1)</script> escaping.ext" + PMD.EOL + "1" + PMD.EOL + + "" + getEscapedFilename() + "" + PMD.EOL + "1" + PMD.EOL + "blah" + PMD.EOL + "" + PMD.EOL + " " + PMD.EOL - + "2" + PMD.EOL + "filename/that/needs <script>alert(1)</script> escaping.ext" + PMD.EOL + + "2" + PMD.EOL + "" + getEscapedFilename() + "" + PMD.EOL + "1" + PMD.EOL + "blah" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL; } diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/PapariTextRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/PapariTextRendererTest.java index e8f82d3c04..85c5a1a0d4 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/PapariTextRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/PapariTextRendererTest.java @@ -4,7 +4,6 @@ package net.sourceforge.pmd.renderers; -import java.io.File; import java.io.FileNotFoundException; import java.io.Reader; import java.io.StringReader; @@ -15,12 +14,6 @@ import net.sourceforge.pmd.Report.ProcessingError; public class PapariTextRendererTest extends AbstractRendererTst { - private static String naString = "n/a"; - - static { - naString = naString.substring(naString.lastIndexOf(File.separator) + 1); - } - @Override public Renderer getRenderer() { TextColorRenderer result = new TextColorRenderer() { @@ -35,7 +28,7 @@ public class PapariTextRendererTest extends AbstractRendererTst { @Override public String getExpected() { - return "* file: n/a" + PMD.EOL + " src: " + naString + ":1:1" + PMD.EOL + " rule: Foo" + PMD.EOL + return "* file: " + getSourceCodeFilename() + PMD.EOL + " src: " + getSourceCodeFilename() + ":1:1" + PMD.EOL + " rule: Foo" + PMD.EOL + " msg: blah" + PMD.EOL + " code: public class Foo {}" + PMD.EOL + PMD.EOL + PMD.EOL + PMD.EOL + "Summary:" + PMD.EOL + PMD.EOL + " : 1" + PMD.EOL + "* warnings: 1" + PMD.EOL; } @@ -47,9 +40,9 @@ public class PapariTextRendererTest extends AbstractRendererTst { @Override public String getExpectedMultiple() { - return "* file: n/a" + PMD.EOL + " src: " + naString + ":1:1" + PMD.EOL + " rule: Foo" + PMD.EOL + return "* file: " + getSourceCodeFilename() + PMD.EOL + " src: " + getSourceCodeFilename() + ":1:1" + PMD.EOL + " rule: Foo" + PMD.EOL + " msg: blah" + PMD.EOL + " code: public class Foo {}" + PMD.EOL + PMD.EOL + " src: " - + naString + ":1:1" + PMD.EOL + " rule: Foo" + PMD.EOL + " msg: blah" + PMD.EOL + + getSourceCodeFilename() + ":1:1" + PMD.EOL + " rule: Foo" + PMD.EOL + " msg: blah" + PMD.EOL + " code: public class Foo {}" + PMD.EOL + PMD.EOL + PMD.EOL + PMD.EOL + "Summary:" + PMD.EOL + PMD.EOL + " : 2" + PMD.EOL + "* warnings: 2" + PMD.EOL; } diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/RenderersTests.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/RenderersTests.java index b852397621..dcb68112b9 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/RenderersTests.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/RenderersTests.java @@ -14,6 +14,19 @@ import org.junit.runners.Suite.SuiteClasses; * @author Boris Gruschko ( boris at gruschko.org ) */ @RunWith(Suite.class) -@SuiteClasses({ CSVRendererTest.class, EmacsRendererTest.class, XMLRendererTest.class, TextPadRendererTest.class }) +@SuiteClasses({ + CodeClimateRendererTest.class, + CSVRendererTest.class, + EmacsRendererTest.class, + HTMLRendererTest.class, + IDEAJRendererTest.class, + PapariTextRendererTest.class, + SummaryHTMLRendererTest.class, + TextPadRendererTest.class, + VBHTMLRendererTest.class, + XMLRendererTest.class, + XSLTRendererTest.class, + YAHTMLRendererTest.class +}) public class RenderersTests { } diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java index cd7d3daf49..912ef5e8b8 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java @@ -31,6 +31,11 @@ public class SummaryHTMLRendererTest extends AbstractRendererTst { return result; } + @Override + protected String getSourceCodeFilename() { + return "notAvailable"; + } + @Override public String getExpected() { return "PMD" + PMD.EOL + "

Summary

" + PMD.EOL @@ -42,7 +47,7 @@ public class SummaryHTMLRendererTest extends AbstractRendererTst { + "

PMD report

Problems found

" + PMD.EOL + "" + PMD.EOL + " " + PMD.EOL + "" + PMD.EOL - + "" + PMD.EOL + + "" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL + "
#FileLineProblem
1n/a" + getSourceCodeFilename() + "1blah
" + PMD.EOL; @@ -71,10 +76,10 @@ public class SummaryHTMLRendererTest extends AbstractRendererTst { + "

PMD report

Problems found

" + PMD.EOL + "" + PMD.EOL + " " + PMD.EOL + "" + PMD.EOL - + "" + PMD.EOL + + "" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL + " " + PMD.EOL + "" + PMD.EOL - + "" + PMD.EOL + + "" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL + "
#FileLineProblem
1n/a" + getSourceCodeFilename() + "1blah
2n/a" + getSourceCodeFilename() + "1blah
" + PMD.EOL; } diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextPadRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextPadRendererTest.java index b220b32aae..036f918827 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextPadRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextPadRendererTest.java @@ -15,7 +15,7 @@ public class TextPadRendererTest extends AbstractRendererTst { @Override public String getExpected() { - return "n/a(1, Foo): blah" + PMD.EOL; + return getSourceCodeFilename() + "(1, Foo): blah" + PMD.EOL; } @Override @@ -25,7 +25,7 @@ public class TextPadRendererTest extends AbstractRendererTst { @Override public String getExpectedMultiple() { - return "n/a(1, Foo): blah" + PMD.EOL + "n/a(1, Foo): blah" + PMD.EOL; + return getSourceCodeFilename() + "(1, Foo): blah" + PMD.EOL + getSourceCodeFilename() + "(1, Foo): blah" + PMD.EOL; } public static junit.framework.Test suite() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextRendererTest.java index 4cdd2053c6..59bb71944f 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextRendererTest.java @@ -17,7 +17,7 @@ public class TextRendererTest extends AbstractRendererTst { @Override public String getExpected() { - return "n/a:1:\tblah" + PMD.EOL; + return getSourceCodeFilename() + ":1:\tblah" + PMD.EOL; } @Override @@ -27,7 +27,8 @@ public class TextRendererTest extends AbstractRendererTst { @Override public String getExpectedMultiple() { - return "n/a:1:\tblah" + PMD.EOL + "n/a:1:\tblah" + PMD.EOL; + return getSourceCodeFilename() + ":1:\tblah" + PMD.EOL + + getSourceCodeFilename() + ":1:\tblah" + PMD.EOL; } @Override diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java index cea1de5b97..a66d6c9919 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java @@ -26,7 +26,7 @@ public class VBHTMLRendererTest extends AbstractRendererTst { + PMD.EOL + "#TableHeader { background-color: #003366; }" + PMD.EOL + "#RowColor1 { background-color: #eeeeee; }" + PMD.EOL + "#RowColor2 { background-color: white; }" + PMD.EOL - + "-->
" + + "-->
 n/a
" + PMD.EOL + "" + PMD.EOL + "
 " + getSourceCodeFilename() + "
1   blah

" + PMD.EOL; @@ -56,7 +56,7 @@ public class VBHTMLRendererTest extends AbstractRendererTst { + PMD.EOL + "#TableHeader { background-color: #003366; }" + PMD.EOL + "#RowColor1 { background-color: #eeeeee; }" + PMD.EOL + "#RowColor2 { background-color: white; }" + PMD.EOL - + "-->
" + + "-->
 n/a
" + PMD.EOL + "" + PMD.EOL diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/XMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/XMLRendererTest.java index 77cd538dcd..d5a60fe211 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/XMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/XMLRendererTest.java @@ -36,7 +36,7 @@ public class XMLRendererTest extends AbstractRendererTst { @Override public String getExpected() { - return getHeader() + "" + PMD.EOL + return getHeader() + "" + PMD.EOL + "" + PMD.EOL + "blah" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL + "" + PMD.EOL; } @@ -48,7 +48,7 @@ public class XMLRendererTest extends AbstractRendererTst { @Override public String getExpectedMultiple() { - return getHeader() + "" + PMD.EOL + return getHeader() + "" + PMD.EOL + "" + PMD.EOL + "blah" + PMD.EOL + "" + PMD.EOL + "" @@ -79,14 +79,14 @@ public class XMLRendererTest extends AbstractRendererTst { return result; } - private static RuleViolation createRuleViolation(String description) { + private RuleViolation createRuleViolation(String description) { DummyNode node = new DummyNode(1); node.testingOnlySetBeginLine(1); node.testingOnlySetBeginColumn(1); node.testingOnlySetEndLine(1); node.testingOnlySetEndColumn(1); RuleContext ctx = new RuleContext(); - ctx.setSourceCodeFile(new File("n/a")); + ctx.setSourceCodeFile(new File(getSourceCodeFilename())); return new ParametricRuleViolation(new FooRule(), ctx, node, description); } From 66b52ee38f74226e95f4a764a115b9fa8a5f4b37 Mon Sep 17 00:00:00 2001 From: Saladoc Date: Tue, 15 Oct 2019 20:21:19 +0200 Subject: [PATCH 2/3] Fix typo in AbstractRendererTest class name --- .../{AbstractRendererTst.java => AbstractRendererTest.java} | 2 +- .../java/net/sourceforge/pmd/renderers/CSVRendererTest.java | 2 +- .../net/sourceforge/pmd/renderers/CodeClimateRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/EmacsRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/EmptyRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/HTMLRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/IDEAJRendererTest.java | 2 +- .../net/sourceforge/pmd/renderers/PapariTextRendererTest.java | 2 +- .../net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/TextPadRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/TextRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/XMLRendererTest.java | 2 +- .../java/net/sourceforge/pmd/renderers/YAHTMLRendererTest.java | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) rename pmd-core/src/test/java/net/sourceforge/pmd/renderers/{AbstractRendererTst.java => AbstractRendererTest.java} (99%) diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTst.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTest.java similarity index 99% rename from pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTst.java rename to pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTest.java index 27ab44c70b..bf3892f032 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTst.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/AbstractRendererTest.java @@ -22,7 +22,7 @@ import net.sourceforge.pmd.lang.ast.DummyNode; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; -public abstract class AbstractRendererTst { +public abstract class AbstractRendererTest { public abstract Renderer getRenderer(); diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CSVRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CSVRendererTest.java index 72ca9fdce0..dbc7a04c21 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CSVRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CSVRendererTest.java @@ -8,7 +8,7 @@ import net.sourceforge.pmd.PMD; import net.sourceforge.pmd.Report.ConfigurationError; import net.sourceforge.pmd.Report.ProcessingError; -public class CSVRendererTest extends AbstractRendererTst { +public class CSVRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CodeClimateRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CodeClimateRendererTest.java index c1046bc5b8..d3044c62f3 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CodeClimateRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/CodeClimateRendererTest.java @@ -19,7 +19,7 @@ import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; import net.sourceforge.pmd.lang.rule.XPathRule; -public class CodeClimateRendererTest extends AbstractRendererTst { +public class CodeClimateRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmacsRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmacsRendererTest.java index 5d85539711..bf39ff9df4 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmacsRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmacsRendererTest.java @@ -6,7 +6,7 @@ package net.sourceforge.pmd.renderers; import net.sourceforge.pmd.PMD; -public class EmacsRendererTest extends AbstractRendererTst { +public class EmacsRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmptyRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmptyRendererTest.java index 19d5e54e8d..db6c11942e 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmptyRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/EmptyRendererTest.java @@ -6,7 +6,7 @@ package net.sourceforge.pmd.renderers; import org.junit.Test; -public class EmptyRendererTest extends AbstractRendererTst { +public class EmptyRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/HTMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/HTMLRendererTest.java index fa1309ea61..88caa8c339 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/HTMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/HTMLRendererTest.java @@ -8,7 +8,7 @@ import net.sourceforge.pmd.PMD; import net.sourceforge.pmd.Report.ConfigurationError; import net.sourceforge.pmd.Report.ProcessingError; -public class HTMLRendererTest extends AbstractRendererTst { +public class HTMLRendererTest extends AbstractRendererTest { @Override protected String getSourceCodeFilename() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/IDEAJRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/IDEAJRendererTest.java index e12b0b4ce4..8b824b1363 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/IDEAJRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/IDEAJRendererTest.java @@ -6,7 +6,7 @@ package net.sourceforge.pmd.renderers; import net.sourceforge.pmd.PMD; -public class IDEAJRendererTest extends AbstractRendererTst { +public class IDEAJRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/PapariTextRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/PapariTextRendererTest.java index 85c5a1a0d4..43d9651595 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/PapariTextRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/PapariTextRendererTest.java @@ -12,7 +12,7 @@ import net.sourceforge.pmd.PMD; import net.sourceforge.pmd.Report.ConfigurationError; import net.sourceforge.pmd.Report.ProcessingError; -public class PapariTextRendererTest extends AbstractRendererTst { +public class PapariTextRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java index 912ef5e8b8..e3715069e1 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/SummaryHTMLRendererTest.java @@ -21,7 +21,7 @@ import net.sourceforge.pmd.RuleContext; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; -public class SummaryHTMLRendererTest extends AbstractRendererTst { +public class SummaryHTMLRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextPadRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextPadRendererTest.java index 036f918827..c96d73c2f5 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextPadRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextPadRendererTest.java @@ -6,7 +6,7 @@ package net.sourceforge.pmd.renderers; import net.sourceforge.pmd.PMD; -public class TextPadRendererTest extends AbstractRendererTst { +public class TextPadRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextRendererTest.java index 59bb71944f..e5118ab038 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/TextRendererTest.java @@ -8,7 +8,7 @@ import net.sourceforge.pmd.PMD; import net.sourceforge.pmd.Report.ConfigurationError; import net.sourceforge.pmd.Report.ProcessingError; -public class TextRendererTest extends AbstractRendererTst { +public class TextRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java index a66d6c9919..d08536db10 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/VBHTMLRendererTest.java @@ -8,7 +8,7 @@ import net.sourceforge.pmd.PMD; import net.sourceforge.pmd.Report.ConfigurationError; import net.sourceforge.pmd.Report.ProcessingError; -public class VBHTMLRendererTest extends AbstractRendererTst { +public class VBHTMLRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/XMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/XMLRendererTest.java index d5a60fe211..b72e00ec5c 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/XMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/XMLRendererTest.java @@ -27,7 +27,7 @@ import net.sourceforge.pmd.lang.ast.DummyNode; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; -public class XMLRendererTest extends AbstractRendererTst { +public class XMLRendererTest extends AbstractRendererTest { @Override public Renderer getRenderer() { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/YAHTMLRendererTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/YAHTMLRendererTest.java index 25dfca5faa..0d7f68341a 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/renderers/YAHTMLRendererTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/renderers/YAHTMLRendererTest.java @@ -31,7 +31,7 @@ import net.sourceforge.pmd.lang.ast.DummyNode; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; -public class YAHTMLRendererTest extends AbstractRendererTst { +public class YAHTMLRendererTest extends AbstractRendererTest { private String outputDir; From a91803f157a19f17ddf05a06ac9a7dcd8d03017d Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 17 Oct 2019 20:32:59 +0200 Subject: [PATCH 3/3] [doc] Update release notes, refs #2070, fixes #2067 --- docs/pages/release_notes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index d9f11046c3..a23d4bf758 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -33,6 +33,7 @@ This is a {{ site.pmd.release_type }} release. * core * [#2014](https://github.com/pmd/pmd/issues/2014): \[core] Making add(SourceCode sourceCode) public for alternative file systems * [#2036](https://github.com/pmd/pmd/issues/2036): \[core] Wrong include/exclude patterns are silently ignored + * [#2067](https://github.com/pmd/pmd/issues/2067): \[core] Build issue on Windows * java * [#2042](https://github.com/pmd/pmd/issues/2042): \[java] PMD crashes with ClassFormatError: Absent Code attribute... * java-bestpractices @@ -86,6 +87,7 @@ This is a {{ site.pmd.release_type }} release. * [#2032](https://github.com/pmd/pmd/pull/2032): \[core] Allow adding SourceCode directly into CPD - [Nathan Braun](https://github.com/nbraun-Google) * [#2047](https://github.com/pmd/pmd/pull/2047): \[java] Fix computation of metrics with annotations - [Andi](https://github.com/andipabst) * [#2065](https://github.com/pmd/pmd/pull/2065): \[java] Stop checking UR anomalies - [Carlos Macasaet](https://github.com/l0s) +* [#2070](https://github.com/pmd/pmd/pull/2070): \[core] Fix renderer tests for windows builds - [Saladoc](https://github.com/Saladoc) {% endtocmaker %}
 " + getSourceCodeFilename() + "
1   blah