From 419c2a1dc4dd8895b713441b8b0af5140ca7830b Mon Sep 17 00:00:00 2001 From: Laura Cameran Date: Mon, 1 Mar 2021 14:41:25 +0100 Subject: [PATCH] Delete images in PRs report --- .../bitbucket/sonar/review/PullRequestReviewResults.scala | 5 ++--- .../scala/ch/mibex/bitbucket/sonar/utils/SonarUtils.scala | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/scala/ch/mibex/bitbucket/sonar/review/PullRequestReviewResults.scala b/src/main/scala/ch/mibex/bitbucket/sonar/review/PullRequestReviewResults.scala index 6c706c5..43b398d 100644 --- a/src/main/scala/ch/mibex/bitbucket/sonar/review/PullRequestReviewResults.scala +++ b/src/main/scala/ch/mibex/bitbucket/sonar/review/PullRequestReviewResults.scala @@ -44,10 +44,9 @@ class PullRequestReviewResults(pluginConfiguration: SonarBBPluginConfig) { } private def appendIssueSeverityRemark(markdown: StringBuilder) = { - val severityImgMarkdown = SonarUtils.toImageMarkdown(Severity.valueOf(pluginConfiguration.minSeverity())) markdown.append( s"""Note that only issues with severity >= - |$severityImgMarkdown (${pluginConfiguration.minSeverity().toLowerCase}) + | ${pluginConfiguration.minSeverity().toLowerCase} |are reported.""".stripMargin.replaceAll("\n", " ") ) } @@ -64,7 +63,7 @@ class PullRequestReviewResults(pluginConfiguration: SonarBBPluginConfig) { private def printNewIssuesForMarkdown(sb: StringBuilder, severity: Severity) = { val issueCount = newIssuesBySeverity(severity) if (issueCount > 0) { - sb.append(s"* ${SonarUtils.toImageMarkdown(severity)} $issueCount ${severity.toString.toLowerCase}\n") + sb.append(s"* $issueCount ${severity.toString.toLowerCase}\n") } } diff --git a/src/main/scala/ch/mibex/bitbucket/sonar/utils/SonarUtils.scala b/src/main/scala/ch/mibex/bitbucket/sonar/utils/SonarUtils.scala index c994169..591075d 100644 --- a/src/main/scala/ch/mibex/bitbucket/sonar/utils/SonarUtils.scala +++ b/src/main/scala/ch/mibex/bitbucket/sonar/utils/SonarUtils.scala @@ -32,8 +32,7 @@ object SonarUtils { val ruleLink = getRuleLink(issue.ruleKey(), settings) val sb = new mutable.StringBuilder() val severity = issue.severity() - sb.append(toImageMarkdown(severity)) - .append(s" **$severity**: ") + sb.append(s" **$severity**: ") .append(issue.message()) .append(" ") .append(ruleLink)