本文整理了Java中org.sonar.api.rules.Rule.setRepositoryKey
方法的一些代码示例,展示了Rule.setRepositoryKey
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rule.setRepositoryKey
方法的具体详情如下:
包路径:org.sonar.api.rules.Rule
类名称:Rule
方法名:setRepositoryKey
暂无
代码示例来源:origin: SonarSource/sonarqube
public Rule setUniqueKey(String repositoryKey, String key) {
return setRepositoryKey(repositoryKey).setKey(key).setConfigKey(key);
}
代码示例来源:origin: SonarSource/sonarqube
.setCreatedAt(new Date(rule.getCreatedAt()))
.setUpdatedAt(new Date(rule.getUpdatedAt()))
.setRepositoryKey(rule.getRepositoryKey())
.setSeverity(severity != null ? RulePriority.valueOf(severity) : null)
.setStatus(rule.getStatus().name())
代码示例来源:origin: SonarSource/sonarqube
.setCreatedAt(new Date(ruleDefinition.getCreatedAt()))
.setUpdatedAt(new Date(ruleDefinition.getUpdatedAt()))
.setRepositoryKey(ruleDefinition.getRepositoryKey())
.setSeverity(severity != null ? RulePriority.valueOf(severity) : null)
.setStatus(ruleDefinition.getStatus().name())
代码示例来源:origin: org.sonarsource.sonarqube/sonar-plugin-api
public Rule setUniqueKey(String repositoryKey, String key) {
return setRepositoryKey(repositoryKey).setKey(key).setConfigKey(key);
}
代码示例来源:origin: org.codehaus.sonar/sonar-plugin-api
public Rule setUniqueKey(String repositoryKey, String key) {
return setRepositoryKey(repositoryKey).setKey(key).setConfigKey(key);
}
代码示例来源:origin: octo-technology/sonar-objective-c
private void recordViolation(final org.sonar.api.resources.File resource,
final SMInputCursor line) throws XMLStreamException {
final Rule rule = Rule.create();
final Violation violation = Violation.create(rule, resource);
// PMD Priorities are 1, 2, 3, 4, 5 RulePriority[0] is INFO
rule.setSeverity(RulePriority.values()[PMD_MINIMUM_PRIORITY
- Integer.valueOf(line.getAttrValue("priority"))]);
rule.setKey(line.getAttrValue("rule"));
rule.setRepositoryKey(OCLintRuleRepository.REPOSITORY_KEY);
violation.setLineId(Integer.valueOf(line.getAttrValue("beginline")));
violation.setMessage(line.getElemStringValue());
foundViolations.add(violation);
}
代码示例来源:origin: org.sonarsource.sonarqube/sonar-server
.setCreatedAt(new Date(rule.getCreatedAt()))
.setUpdatedAt(new Date(rule.getUpdatedAt()))
.setRepositoryKey(rule.getRepositoryKey())
.setSeverity(severity != null ? RulePriority.valueOf(severity) : null)
.setStatus(rule.getStatus().name())
代码示例来源:origin: org.sonarsource.sonarqube/sonar-server
.setCreatedAt(new Date(ruleDefinition.getCreatedAt()))
.setUpdatedAt(new Date(ruleDefinition.getUpdatedAt()))
.setRepositoryKey(ruleDefinition.getRepositoryKey())
.setSeverity(severity != null ? RulePriority.valueOf(severity) : null)
.setStatus(ruleDefinition.getStatus().name())
内容来源于网络,如有侵权,请联系作者删除!