diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRenderer.java b/pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRenderer.java index 5812f4839a..8b20dc83a6 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRenderer.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/renderers/CodeClimateRenderer.java @@ -37,18 +37,17 @@ public class CodeClimateRenderer extends AbstractIncrementingRenderer { // Note: required by https://github.com/codeclimate/spec/blob/master/SPEC.md protected static final String NULL_CHARACTER = "\u0000"; protected static final List INTERNAL_DEV_PROPERTIES = Arrays.asList("version", "xpath"); - private final String pmdDeveloperUrl; + private static final String PMD_PROPERTIES_URL = getPmdPropertiesURL(); private Rule rule; public CodeClimateRenderer() { super(NAME, "Code Climate integration."); - pmdDeveloperUrl = getPmdDeveloperURL(); } - private static String getPmdDeveloperURL() { - String url = "https://pmd.github.io/pmd-" + PMDVersion.VERSION + "/customizing/pmd-developer.html"; + private static String getPmdPropertiesURL() { + String url = "https://pmd.github.io/pmd-" + PMDVersion.VERSION + "/pmd_devdocs_working_with_properties.html"; if (PMDVersion.isSnapshot() || PMDVersion.isUnknown()) { - url = "https://pmd.github.io/latest/customizing/pmd-developer.html"; + url = "https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html"; } return url; } @@ -167,7 +166,7 @@ public class CodeClimateRenderer extends AbstractIncrementingRenderer { } if (!rule.getPropertyDescriptors().isEmpty()) { - result += "\\n\\n### [PMD properties](" + pmdDeveloperUrl + ")\\n\\n"; + result += "\\n\\n### [PMD properties](" + PMD_PROPERTIES_URL + ")\\n\\n"; result += "Name | Value | Description\\n"; result += "--- | --- | ---\\n"; 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 488d93cd85..3db4099838 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 @@ -31,7 +31,7 @@ public class CodeClimateRendererTest extends AbstractRendererTst { + "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n" + "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\\n\\n" + "desc\\n\\n" - + "### [PMD properties](https://pmd.github.io/latest/customizing/pmd-developer.html)\\n\\n" + + "### [PMD properties](https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html)\\n\\n" + "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" @@ -46,7 +46,7 @@ public class CodeClimateRendererTest extends AbstractRendererTst { + "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n" + "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\\n\\n" + "desc\\n\\n" - + "### [PMD properties](https://pmd.github.io/latest/customizing/pmd-developer.html)\\n\\n" + + "### [PMD properties](https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html)\\n\\n" + "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" @@ -68,7 +68,7 @@ public class CodeClimateRendererTest extends AbstractRendererTst { + "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n" + "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\\n\\n" + "desc\\n\\n" - + "### [PMD properties](https://pmd.github.io/latest/customizing/pmd-developer.html)\\n\\n" + + "### [PMD properties](https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html)\\n\\n" + "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" @@ -78,7 +78,7 @@ public class CodeClimateRendererTest extends AbstractRendererTst { + "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): Style\\n\\n" + "[Remediation Points](https://github.com/codeclimate/spec/blob/master/SPEC.md#remediation-points): 50000\\n\\n" + "desc\\n\\n" - + "### [PMD properties](https://pmd.github.io/latest/customizing/pmd-developer.html)\\n\\n" + + "### [PMD properties](https://pmd.github.io/latest/pmd_devdocs_working_with_properties.html)\\n\\n" + "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"