Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile reporter using very strict settings #433

Merged
merged 1 commit into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions scala/support/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,22 @@ scala_library(
'//external:io_bazel_rules_scala/dependency/scala/scala_xml',
'//external:io_bazel_rules_scala/dependency/scalatest/scalatest'
],
scalacopts = [
"-deprecation:true",
"-encoding", "UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture",
"-Ywarn-unused-import",
"-Ypartial-unification",
]
)
5 changes: 2 additions & 3 deletions scala/support/JUnitXmlReporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import java.io.PrintWriter
import java.net.InetAddress
import java.net.UnknownHostException
import java.text.SimpleDateFormat
import java.util.Enumeration
import java.util.Properties
import scala.collection.mutable.ListBuffer
import scala.xml
Expand Down Expand Up @@ -360,10 +359,10 @@ class JUnitXmlReporter extends Reporter {
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + withCDATA
}

def xmlify(suites: Iterable[Testsuite]): scala.xml.Elem =
private def xmlify(suites: Iterable[Testsuite]): scala.xml.Elem =
<testsuites> { suites.map(xmlify) } </testsuites>

def xmlify(testsuite: Testsuite): scala.xml.Elem =
private def xmlify(testsuite: Testsuite): scala.xml.Elem =
<testsuite
errors = { "" + testsuite.errors }
failures = { "" + testsuite.failures }
Expand Down