Skip to content

Commit

Permalink
Kover support: add an error message if binary report is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
0xnm committed Sep 29, 2024
1 parent 1330e2f commit 3e00f9d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions kotlinlib/src/mill/kotlinlib/contrib/kover/KoverModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,16 @@ object Kover extends ExternalModule with KoverReportBaseModule {
os.exists
)
val binaryReportsPaths: Seq[Path] =
T.sequence(binaryReportTasks)().map(_.path).filter(
os.exists
)
T.sequence(binaryReportTasks)().map(_.path)
.filter(path => {
val exists = os.exists(path)
if (!exists) {
T.log.error(
s"Kover binary report $path doesn't exist. Did you run tests for the module?."
)
}
exists
})

val reportDir = PathRef(T.dest).path / reportName

Expand Down

0 comments on commit 3e00f9d

Please # to comment.