forked from phoedos/pmd
Merge branch 'pr-1105'
This commit is contained in:
@ -34,6 +34,8 @@ This is a bug fixing release.
|
||||
* [#1097](https://github.com/pmd/pmd/pull/1097): \[java] False negative in AvoidThrowingRawExceptionTypes
|
||||
* java-performance
|
||||
* [#1098](https://github.com/pmd/pmd/pull/1098): \[java] Simplify LongInstantiation, IntegerInstantiation, ByteInstantiation, and ShortInstantiation using type resolution
|
||||
* doc
|
||||
* [#999](https://github.com/pmd/pmd/issues/999): \[doc] Add a header before the XPath expression in rules
|
||||
|
||||
### API Changes
|
||||
|
||||
|
@ -390,17 +390,17 @@ public class RuleDocGenerator {
|
||||
lines.add("");
|
||||
|
||||
if (rule instanceof XPathRule || rule instanceof RuleReference && ((RuleReference) rule).getRule() instanceof XPathRule) {
|
||||
lines.add("**This rule is defined by the following XPath expression:** ");
|
||||
lines.add("```");
|
||||
lines.addAll(toLines(StringUtils.stripToEmpty(rule.getProperty(XPathRule.XPATH_DESCRIPTOR))));
|
||||
lines.add("```");
|
||||
lines.add("");
|
||||
} else {
|
||||
lines.add("**This rule is defined by the following Java class:** "
|
||||
+ "[" + rule.getRuleClass() + "]("
|
||||
+ GITHUB_SOURCE_LINK + getRuleClassSourceFilepath(rule.getRuleClass())
|
||||
+ ")");
|
||||
lines.add("");
|
||||
}
|
||||
lines.add("");
|
||||
|
||||
if (!rule.getExamples().isEmpty()) {
|
||||
lines.add("**Example(s):**");
|
||||
|
Reference in New Issue
Block a user