net.sourceforge.pmd.Rule.getSince()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中net.sourceforge.pmd.Rule.getSince方法的一些代码示例,展示了Rule.getSince的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rule.getSince方法的具体详情如下:
包路径:net.sourceforge.pmd.Rule
类名称:Rule
方法名:getSince

Rule.getSince介绍

[英]Get the version of PMD in which this Rule was added. Return null if not applicable.
[中]获取添加此规则的PMD版本。如果不适用,返回null

代码示例

代码示例来源:origin: pmd/pmd

@Override
public String getSince() {
  return rule.getSince();
}

代码示例来源:origin: pmd/pmd

private <T> String getBody() {
  String result = "## " + rule.getName() + "\\n\\n" + "Since: PMD " + rule.getSince() + "\\n\\n" + "Priority: "
    + rule.getPriority() + "\\n\\n"
    + "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): "

代码示例来源:origin: pmd/pmd

lines.add("");
if (rule.getSince() != null) {
  lines.add("**Since:** PMD " + rule.getSince());
  lines.add("");

代码示例来源:origin: pmd/pmd

if (rule.getSince() == null) {
  invalidSinceAttributes++;
  messages += "Rule " + fileName + "/" + rule.getName() + " is missing 'since' attribute" + PMD.EOL;

代码示例来源:origin: pmd/pmd

return createSingleRuleElement(rule instanceof ImmutableLanguage ? null : rule.getLanguage(),
    rule.getMinimumLanguageVersion(), rule.getMaximumLanguageVersion(), rule.isDeprecated(),
    rule.getName(), rule.getSince(), null, rule.getMessage(), rule.getExternalInfoUrl(),
    rule.getRuleClass(), rule.isDfa(), rule.isTypeResolution(), rule.isMultifile(),
    rule.getDescription(),

代码示例来源:origin: net.sourceforge.pmd/pmd-core

@Override
public String getSince() {
  return rule.getSince();
}

代码示例来源:origin: net.sourceforge.pmd/pmd-core

private <T> String getBody() {
  String result = "## " + rule.getName() + "\\n\\n" + "Since: PMD " + rule.getSince() + "\\n\\n" + "Priority: "
    + rule.getPriority() + "\\n\\n"
    + "[Categories](https://github.com/codeclimate/spec/blob/master/SPEC.md#categories): "

代码示例来源:origin: net.sourceforge.pmd/pmd-test

if (rule.getSince() == null) {
  invalidSinceAttributes++;
  messages += "Rule " + fileName + "/" + rule.getName() + " is missing 'since' attribute" + PMD.EOL;

代码示例来源:origin: net.sourceforge.pmd/pmd-core

return createSingleRuleElement(rule instanceof ImmutableLanguage ? null : rule.getLanguage(),
    rule.getMinimumLanguageVersion(), rule.getMaximumLanguageVersion(), rule.isDeprecated(),
    rule.getName(), rule.getSince(), null, rule.getMessage(), rule.getExternalInfoUrl(),
    rule.getRuleClass(), rule.isDfa(), rule.isTypeResolution(), rule.isMultifile(),
    rule.getDescription(),

相关文章