summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/api/src/mill/api/BuildReporter.scala (renamed from main/api/src/mill/api/TestReporter.scala)30
1 files changed, 20 insertions, 10 deletions
diff --git a/main/api/src/mill/api/TestReporter.scala b/main/api/src/mill/api/BuildReporter.scala
index 8adea687..f8405984 100644
--- a/main/api/src/mill/api/TestReporter.scala
+++ b/main/api/src/mill/api/BuildReporter.scala
@@ -31,6 +31,10 @@ object DummyTestReporter extends TestReporter {
}
}
+/**
+ * A listener trait for getting notified about
+ * build output like compiler warnings and errors
+ */
trait BuildProblemReporter {
def logError(problem: Problem): Unit
@@ -41,6 +45,22 @@ trait BuildProblemReporter {
def printSummary(): Unit
}
+/**
+ * Contains general information about the build problem
+ */
+trait Problem {
+ def category: String
+
+ def severity: Severity
+
+ def message: String
+
+ def position: ProblemPosition
+}
+
+/**
+ * Indicates the exact location (source file, line, column) of the build problem
+ */
trait ProblemPosition {
def line: Option[Int]
@@ -74,14 +94,4 @@ case object Info extends Severity
case object Error extends Severity
case object Warn extends Severity
-trait Problem {
- def category: String
-
- def severity: Severity
-
- def message: String
-
- def position: ProblemPosition
-}
-