@Override String format(@Nullable RulePriority s) { return s == null ? "" : s.toString(); }
newRule.setInternalKey(rule.getConfigKey()); newRule.setTemplate(rule.isTemplate()); newRule.setSeverity(rule.getSeverity().toString()); newRule.setStatus(rule.getStatus() == null ? RuleStatus.defaultStatus() : RuleStatus.valueOf(rule.getStatus())); newRule.setTags(rule.getTags());
@Override String format(RulePriority s) { return s == null ? "" : s.toString(); }
@Override String format(@Nullable RulePriority s) { return s == null ? "" : s.toString(); }
public String getSeverity() { return reportRuleKey.getSeverity().toString(); }
public String getSeverity() { return reportRuleKey.getSeverity().toString(); }
public String getSeverity() { return reportRuleKey.getSeverity().toString(); }
private void printNewIssues(StringBuilder sb, IssuesReport report, RulePriority severity, String severityLabel) { IssueVariation issueVariation = report.getSummary().getTotalBySeverity().get(severity.toString()); if (issueVariation != null) { int issueCount = issueVariation.getNewIssuesCount(); if (issueCount > 0) { sb.append(StringUtils.leftPad("+" + issueCount, LEFT_PAD)).append(" ").append(severityLabel).append("\n"); } } } }
private void initMaps(ReportRuleKey reportRuleKey) { if (!ruleReportByRuleKey.containsKey(reportRuleKey)) { ruleReportByRuleKey.put(reportRuleKey, new RuleReport(reportRuleKey)); } if (!totalByRuleKey.containsKey(reportRuleKey.getRule().ruleKey().toString())) { totalByRuleKey.put(reportRuleKey.getRule().ruleKey().toString(), new IssueVariation()); } if (!totalBySeverity.containsKey(reportRuleKey.getSeverity().toString())) { totalBySeverity.put(reportRuleKey.getSeverity().toString(), new IssueVariation()); } }
private void initMaps(ReportRuleKey reportRuleKey) { if (!ruleReportByRuleKey.containsKey(reportRuleKey)) { ruleReportByRuleKey.put(reportRuleKey, new RuleReport(reportRuleKey)); } if (!totalByRuleKey.containsKey(reportRuleKey.getRule().ruleKey().toString())) { totalByRuleKey.put(reportRuleKey.getRule().ruleKey().toString(), new IssueVariation()); } if (!totalBySeverity.containsKey(reportRuleKey.getSeverity().toString())) { totalBySeverity.put(reportRuleKey.getSeverity().toString(), new IssueVariation()); } }
private void initMaps(ReportRuleKey reportRuleKey) { if (!ruleReportByRuleKey.containsKey(reportRuleKey)) { ruleReportByRuleKey.put(reportRuleKey, new RuleReport(reportRuleKey)); } if (!totalByRuleKey.containsKey(reportRuleKey.getRule().key().toString())) { totalByRuleKey.put(reportRuleKey.getRule().key().toString(), new IssueVariation()); } if (!totalBySeverity.containsKey(reportRuleKey.getSeverity().toString())) { totalBySeverity.put(reportRuleKey.getSeverity().toString(), new IssueVariation()); } }
public void addIssue(Issue issue, Rule rule, RulePriority severity) { ReportRuleKey reportRuleKey = new ReportRuleKey(rule, severity); initMaps(reportRuleKey); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementCountInCurrentAnalysis(); total.incrementCountInCurrentAnalysis(); totalByRuleKey.get(rule.ruleKey().toString()).incrementCountInCurrentAnalysis(); totalBySeverity.get(severity.toString()).incrementCountInCurrentAnalysis(); if (issue.isNew()) { total.incrementNewIssuesCount(); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementNewIssuesCount(); totalByRuleKey.get(rule.ruleKey().toString()).incrementNewIssuesCount(); totalBySeverity.get(severity.toString()).incrementNewIssuesCount(); } }
public void addIssue(TrackedIssue issue, Rule rule, RulePriority severity) { ReportRuleKey reportRuleKey = new ReportRuleKey(rule, severity); initMaps(reportRuleKey); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementCountInCurrentAnalysis(); total.incrementCountInCurrentAnalysis(); totalByRuleKey.get(rule.key().toString()).incrementCountInCurrentAnalysis(); totalBySeverity.get(severity.toString()).incrementCountInCurrentAnalysis(); if (issue.isNew()) { total.incrementNewIssuesCount(); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementNewIssuesCount(); totalByRuleKey.get(rule.key().toString()).incrementNewIssuesCount(); totalBySeverity.get(severity.toString()).incrementNewIssuesCount(); } }
public void addResolvedIssue(TrackedIssue issue, Rule rule, RulePriority severity) { ReportRuleKey reportRuleKey = new ReportRuleKey(rule, severity); initMaps(reportRuleKey); total.incrementResolvedIssuesCount(); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementResolvedIssuesCount(); totalByRuleKey.get(rule.key().toString()).incrementResolvedIssuesCount(); totalBySeverity.get(severity.toString()).incrementResolvedIssuesCount(); }
public void addResolvedIssue(Issue issue, Rule rule, RulePriority severity) { ReportRuleKey reportRuleKey = new ReportRuleKey(rule, severity); initMaps(reportRuleKey); total.incrementResolvedIssuesCount(); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementResolvedIssuesCount(); totalByRuleKey.get(rule.ruleKey().toString()).incrementResolvedIssuesCount(); totalBySeverity.get(severity.toString()).incrementResolvedIssuesCount(); }
public void addResolvedIssue(Issue issue, Rule rule, RulePriority severity) { ReportRuleKey reportRuleKey = new ReportRuleKey(rule, severity); initMaps(reportRuleKey); total.incrementResolvedIssuesCount(); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementResolvedIssuesCount(); totalByRuleKey.get(rule.ruleKey().toString()).incrementResolvedIssuesCount(); totalBySeverity.get(severity.toString()).incrementResolvedIssuesCount(); }
public void addIssue(Issue issue, Rule rule, RulePriority severity) { ReportRuleKey reportRuleKey = new ReportRuleKey(rule, severity); initMaps(reportRuleKey); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementCountInCurrentAnalysis(); total.incrementCountInCurrentAnalysis(); totalByRuleKey.get(rule.ruleKey().toString()).incrementCountInCurrentAnalysis(); totalBySeverity.get(severity.toString()).incrementCountInCurrentAnalysis(); if (issue.isNew()) { total.incrementNewIssuesCount(); ruleReportByRuleKey.get(reportRuleKey).getTotal().incrementNewIssuesCount(); totalByRuleKey.get(rule.ruleKey().toString()).incrementNewIssuesCount(); totalBySeverity.get(severity.toString()).incrementNewIssuesCount(); } }
newRule.setInternalKey(rule.getConfigKey()); newRule.setTemplate(rule.isTemplate()); newRule.setSeverity(rule.getSeverity().toString()); newRule.setStatus(rule.getStatus() == null ? RuleStatus.defaultStatus() : RuleStatus.valueOf(rule.getStatus())); newRule.setTags(rule.getTags());