File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ object Reporter {
24
24
}
25
25
}
26
26
27
- /** A reporter that ignores reports */
27
+ /** A reporter that ignores reports, and doesn't record errors */
28
28
@ sharable object NoReporter extends Reporter {
29
29
def doReport (m : MessageContainer )(implicit ctx : Context ) = ()
30
30
override def report (m : MessageContainer )(implicit ctx : Context ): Unit = ()
@@ -163,8 +163,10 @@ abstract class Reporter extends interfaces.ReporterResult {
163
163
finally incompleteHandler = saved
164
164
}
165
165
166
- var errorCount = 0
167
- var warningCount = 0
166
+ private [this ] var _errorCount = 0
167
+ private [this ] var _warningCount = 0
168
+ def errorCount = _errorCount
169
+ def warningCount = _warningCount
168
170
def hasErrors = errorCount > 0
169
171
def hasWarnings = warningCount > 0
170
172
private [this ] var errors : List [Error ] = Nil
@@ -191,10 +193,10 @@ abstract class Reporter extends interfaces.ReporterResult {
191
193
doReport(m)(ctx.addMode(Mode .Printing ))
192
194
m match {
193
195
case m : ConditionalWarning if ! m.enablingOption.value => unreportedWarnings(m.enablingOption.name) += 1
194
- case m : Warning => warningCount += 1
196
+ case m : Warning => _warningCount += 1
195
197
case m : Error =>
196
198
errors = m :: errors
197
- errorCount += 1
199
+ _errorCount += 1
198
200
case m : Info => // nothing to do here
199
201
// match error if d is something else
200
202
}
Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ final class JLineTerminal extends java.io.Closeable {
50
50
.completer(completer)
51
51
.highlighter(new Highlighter )
52
52
.parser(new Parser )
53
- .variable(SECONDARY_PROMPT_PATTERN , " %M" )
53
+ .variable(SECONDARY_PROMPT_PATTERN , " %M" ) // A short word explaining what is "missing".
54
+ // This is supplied from the EOFError.getMissing() method
54
55
.variable(LIST_MAX , 400 ) // ask user when number of completions exceed this limit (default is 100)
55
56
.option(INSERT_TAB , true ) // at the beginning of the line, insert tab instead of completing
56
57
.option(AUTO_FRESH_LINE , true ) // if not at start of line before prompt, move to new line
You can’t perform that action at this time.
0 commit comments