update broken url

This commit is contained in:
Juan Martín Sotuyo Dodero
2018-01-25 12:10:27 -03:00
parent c436e9bd94
commit 49a7c7d75b
2 changed files with 9 additions and 10 deletions

View File

@ -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<String> 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";

View File

@ -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"