Skip to content

Commit 74277ab

Browse files
feature: adds severity high support CF-1779 (#155)
1 parent 5bb6f8c commit 74277ab

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Global / cancelable := true
99
connectInput / run := true
1010
outputStrategy := Some(StdoutOutput)
1111

12-
libraryDependencies ++= Seq("com.codacy" %% "codacy-analysis-core" % "7.9.4",
12+
libraryDependencies ++= Seq("com.codacy" %% "codacy-analysis-core" % "7.9.25",
1313
"com.lihaoyi" %% "pprint" % "0.8.1",
1414
"org.wvlet.airframe" %% "airframe-log" % "21.3.0",
1515
"org.scalatest" %% "scalatest" % "3.2.17")

src/main/scala/codacy/plugins/test/MetricsTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object MetricsTests extends ITest with CustomMatchers {
2222

2323
val languages = findLanguages(testsDirectory.toJava)
2424
val metricsTool = MetricsToolSpec(dockerImage.toString(), languages)
25-
val tools = languages.map(language => new MetricsTool(metricsTool, language))
25+
val tools = languages.map(language => new MetricsTool(metricsTool, language, ""))
2626

2727
val testFiles = new MetricsTestFilesParser(testsDirectory.toJava).getTestFiles
2828

src/main/scala/codacy/plugins/test/PatternTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ object PatternTests extends ITest with CustomMatchers {
2626
val toolSpecOpt = dockerToolDocumentation.toolSpecification
2727
val toolFullSpec = createFullToolSpec(toolSpecOpt.get, dockerToolDocumentation, languages, dockerImage)
2828

29-
val tools = languages.map(new core.tools.Tool(toolFullSpec, _, DockerRunner.defaultRunTimeout))
29+
val tools = languages.map(new core.tools.Tool(toolFullSpec, _, DockerRunner.defaultRunTimeout, ""))
3030

3131
val testFiles = new TestFilesParser(testsDirectory.toJava).getTestFiles
3232

src/main/scala/codacy/plugins/test/duplication/DuplicationTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object DuplicationTests extends ITest {
3232
val languages = findLanguages(srcDir.toJava)
3333
val duplicationTool = new DuplicationTool(dockerImage.toString(), languages.toList)
3434
val duplicationToolSpec = core.model.DuplicationToolSpec(dockerImage.toString(), languages)
35-
val duplicationTools = languages.map(l => new core.tools.DuplicationTool(duplicationToolSpec, l))
35+
val duplicationTools = languages.map(l => new core.tools.DuplicationTool(duplicationToolSpec, l, ""))
3636
val resultFile = testDirectory / "results.xml"
3737
val resultFileXML = XML.loadFile(resultFile.toJava)
3838
val (expectedResults, ignoreMessage) = CheckstyleFormatParser.parseResultsXml(resultFileXML)

src/main/scala/codacy/plugins/test/multiple/CheckstyleFormatParser.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ private[multiple] object CheckstyleFormatParser {
3030
val level = severity match {
3131
case "info" => Level.Info
3232
case "warning" => Level.Warn
33+
case "high" => Level.High
3334
case "error" => Level.Err
34-
case _ => throw new Exception(s"""$severity is not a valid level. Use one of ["info", "warning", "error"]""")
35+
case _ =>
36+
throw new Exception(s"""$severity is not a valid level. Use one of ["info", "warning", "high", "error"]""")
3537
}
3638
Issue(api.results.Pattern.Id(patternId), filePath, Issue.Message(message), level, None, LineLocation(line))
3739
} else {

0 commit comments

Comments
 (0)