Skip to content

Commit 3ef14dd

Browse files
authored
Merge pull request #223 from xuwei-k/procedure-syntax
fix procedure syntax
2 parents 084890e + ae3641c commit 3ef14dd

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

scalac-scoverage-plugin/src/main/scala/scoverage/plugin.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ScoveragePlugin(val global: Global) extends Plugin {
1818
val instrumentationComponent = new ScoverageInstrumentationComponent(global, extraAfterPhase, extraBeforePhase)
1919
override val components: List[PluginComponent] = List(instrumentationComponent)
2020

21-
override def processOptions(opts: List[String], error: String => Unit) {
21+
override def processOptions(opts: List[String], error: String => Unit): Unit = {
2222
val options = new ScoverageOptions
2323
for (opt <- opts) {
2424
if (opt.startsWith("excludedPackages:")) {
@@ -227,7 +227,7 @@ class ScoverageInstrumentationComponent(val global: Global, extraAfterPhase: Opt
227227
def isStatementIncluded(pos: Position): Boolean = coverageFilter.isLineIncluded(pos)
228228
def isSymbolIncluded(symbol: Symbol): Boolean = coverageFilter.isSymbolIncluded(symbol.fullNameString)
229229

230-
def updateLocation(t: Tree) {
230+
def updateLocation(t: Tree): Unit = {
231231
Location(global)(t) match {
232232
case Some(loc) => this.location = loc
233233
case _ => reporter.warning(t.pos, s"[warn] Cannot update location for $t")
@@ -259,7 +259,7 @@ class ScoverageInstrumentationComponent(val global: Global, extraAfterPhase: Opt
259259
)
260260
}
261261

262-
def debug(t: Tree) {
262+
def debug(t: Tree): Unit = {
263263
import scala.reflect.runtime.{universe => u}
264264
reporter.echo(t.getClass.getSimpleName + ": LINE " + safeLine(t) + ": " + u.showRaw(t))
265265
}

scalac-scoverage-plugin/src/test/scala/scoverage/CoberturaXmlWriterTest.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ class CoberturaXmlWriterTest extends FunSuite with BeforeAndAfter with OneInstan
6565
val builder = domFactory.newDocumentBuilder()
6666
builder.setErrorHandler(new ErrorHandler() {
6767
@Override
68-
def error(e: SAXParseException) {
68+
def error(e: SAXParseException): Unit = {
6969
fail(e)
7070
}
7171
@Override
72-
def fatalError(e: SAXParseException) {
72+
def fatalError(e: SAXParseException): Unit = {
7373
fail(e)
7474
}
7575

7676
@Override
77-
def warning(e: SAXParseException) {
77+
def warning(e: SAXParseException): Unit = {
7878
fail(e)
7979
}
8080
})

scalac-scoverage-plugin/src/test/scala/scoverage/LocationCompiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class LocationCompiler(settings: scala.tools.nsc.Settings, reporter: scala.tools
4343
}
4444
}
4545

46-
override def computeInternalPhases() {
46+
override def computeInternalPhases(): Unit = {
4747
super.computeInternalPhases()
4848
addToPhasesSet(locationSetter, "sets locations")
4949
}

scalac-scoverage-plugin/src/test/scala/scoverage/ScoverageCompiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class ScoverageCompiler(settings: scala.tools.nsc.Settings, reporter: scala.tool
145145
}
146146
}
147147

148-
override def computeInternalPhases() {
148+
override def computeInternalPhases(): Unit = {
149149
super.computeInternalPhases()
150150
addToPhasesSet(validator, "scoverage validator")
151151
addToPhasesSet(instrumentationComponent, "scoverage instrumentationComponent")

scalac-scoverage-runtime/js/src/main/scala/scalajssupport/JsFile.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ trait FileFilter {
2626
}
2727

2828
trait JsFileObject {
29-
def write(path: String, data: String, mode: String = "a")
29+
def write(path: String, data: String, mode: String = "a"): Unit
3030
def pathJoin(path: String, child: String): String
3131
def apply(path: String): JsFile
3232
}

0 commit comments

Comments
 (0)