Skip to content

Commit 22b6fa5

Browse files
committed
handling analyzer failure
1 parent 405f0b0 commit 22b6fa5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/scala/org/polystat/cli/EO.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ object EO:
2222
.traverse { case (codePath, code) =>
2323
for
2424
_ <- IO.println(s"Analyzing $codePath...")
25-
analyzed <- cfg.filteredAnalyzers.traverse(
26-
_.analyze(cfg.tempDir)(codePath)(code)
25+
analyzed <- cfg.filteredAnalyzers.traverse(a =>
26+
a.analyze(cfg.tempDir)(codePath)(code)
27+
.handleError(e => OdinAnalysisResult.AnalyzerFailure(a.ruleId, e))
2728
)
2829
yield (codePath, analyzed)
2930
}

0 commit comments

Comments
 (0)