From 399fddba8c3c12b5f833b67b2bdacbeb85621895 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Tue, 1 Oct 2024 11:43:16 +0200 Subject: [PATCH] Apply easy fixes/inspections --- build.sbt | 1 + .../org/scoverage/coveralls/CIService.scala | 3 +- .../CoberturaMultiSourceReader.scala | 11 ++--- .../coveralls/CoverallPayloadWriter.scala | 21 ++++---- .../scoverage/coveralls/CoverallsAuth.scala | 11 ++--- .../scoverage/coveralls/CoverallsClient.scala | 48 ++++++++++--------- .../scoverage/coveralls/CoverallsPlugin.scala | 26 +++++----- .../org/scoverage/coveralls/GitClient.scala | 16 ++++--- .../scala/org/scoverage/coveralls/Utils.scala | 2 + .../org/scoverage/coveralls/XmlHelper.scala | 5 +- .../scoverage/coveralls/CIServiceTest.scala | 6 +-- .../CoberturaMultiSourceReaderTest.scala | 12 ++--- .../coveralls/CoverallPayloadWriterTest.scala | 21 ++++---- .../coveralls/CoverallsClientTest.scala | 11 ++--- .../scoverage/coveralls/GitClientTest.scala | 15 +++--- .../org/scoverage/coveralls/UtilsTest.scala | 6 +-- .../scoverage/coveralls/XmlHelperTest.scala | 5 +- 17 files changed, 108 insertions(+), 112 deletions(-) diff --git a/build.sbt b/build.sbt index a688917..3463958 100644 --- a/build.sbt +++ b/build.sbt @@ -4,6 +4,7 @@ import sbt.ScriptedPlugin.autoImport.scriptedLaunchOpts import java.io.File import scala.sys.process._ + lazy val generateXMLFiles = taskKey[Unit]("Generate XML files (for test)") generateXMLFiles := { diff --git a/src/main/scala/org/scoverage/coveralls/CIService.scala b/src/main/scala/org/scoverage/coveralls/CIService.scala index 22c43eb..799afff 100644 --- a/src/main/scala/org/scoverage/coveralls/CIService.scala +++ b/src/main/scala/org/scoverage/coveralls/CIService.scala @@ -1,10 +1,11 @@ package org.scoverage.coveralls -import scala.io.Source import io.circe._ import io.circe.parser import io.circe.generic.auto._ +import scala.io.Source + trait CIService { def name: String def jobId: Option[String] diff --git a/src/main/scala/org/scoverage/coveralls/CoberturaMultiSourceReader.scala b/src/main/scala/org/scoverage/coveralls/CoberturaMultiSourceReader.scala index c6d8828..43622cb 100644 --- a/src/main/scala/org/scoverage/coveralls/CoberturaMultiSourceReader.scala +++ b/src/main/scala/org/scoverage/coveralls/CoberturaMultiSourceReader.scala @@ -1,10 +1,9 @@ package org.scoverage.coveralls -// import scala.language.postfixOps -import java.io.File - import sbt.Logger +import java.io.File + class CoberturaMultiSourceReader( coberturaFile: File, sourceDirs: Seq[File], @@ -87,7 +86,7 @@ class CoberturaMultiSourceReader( sfs } - def sourceFilenames = sourceFiles.map(_.getCanonicalPath) + def sourceFilenames: Set[String] = sourceFiles.map(_.getCanonicalPath) /** Splits a path to a source file into two parts: * 1. the absolute path to source directory that contain this sourceFile 2. @@ -112,14 +111,14 @@ class CoberturaMultiSourceReader( (prefix, relativePath) } - protected def lineCoverage(sourceFile: String) = { + protected def lineCoverage(sourceFile: String): Map[Int, Int] = { val filenamePath = splitPath(new File(sourceFile))._2 lineCoverageMap(filenamePath) } - def reportForSource(source: String) = { + def reportForSource(source: String): SourceFileReport = { val fileSrc = sourceEncoding match { case Some(enc) => scala.io.Source.fromFile(source, enc) case None => scala.io.Source.fromFile(source) diff --git a/src/main/scala/org/scoverage/coveralls/CoverallPayloadWriter.scala b/src/main/scala/org/scoverage/coveralls/CoverallPayloadWriter.scala index 65f4ee7..03e8882 100644 --- a/src/main/scala/org/scoverage/coveralls/CoverallPayloadWriter.scala +++ b/src/main/scala/org/scoverage/coveralls/CoverallPayloadWriter.scala @@ -1,12 +1,11 @@ package org.scoverage.coveralls +import com.fasterxml.jackson.core.{JsonEncoding, JsonFactory, JsonGenerator} +import sbt.Logger + import java.io.{File, FileInputStream} import java.security.{DigestInputStream, MessageDigest} -import com.fasterxml.jackson.core.{JsonFactory, JsonEncoding} - -import sbt.Logger - class CoverallPayloadWriter( repoRootDir: File, coverallsFile: File, @@ -17,18 +16,18 @@ class CoverallPayloadWriter( )(implicit log: Logger) { import gitClient._ - val gen = generator(coverallsFile) + val gen: JsonGenerator = generator(coverallsFile) - def generator(file: File) = { + def generator(file: File): JsonGenerator = { if (!file.getParentFile.exists) file.getParentFile.mkdirs val factory = new JsonFactory factory.createGenerator(file, JsonEncoding.UTF8) } - def start() = { + def start(): Unit = { gen.writeStartObject() - def writeOpt(fieldName: String, holder: Option[String]) = + def writeOpt(fieldName: String, holder: Option[String]): Unit = holder foreach { gen.writeStringField(fieldName, _) } coverallsAuth match { @@ -52,7 +51,7 @@ class CoverallPayloadWriter( gen.writeStartArray() } - private def addGitInfo() = { + private def addGitInfo(): Unit = { gen.writeFieldName("git") gen.writeStartObject() @@ -85,7 +84,7 @@ class CoverallPayloadWriter( gen.writeEndObject() } - private def addGitRemotes(remotes: Seq[String]) = { + private def addGitRemotes(remotes: Seq[String]): Unit = { remotes.foreach(remote => { gen.writeStartObject() gen.writeStringField("name", remote) @@ -94,7 +93,7 @@ class CoverallPayloadWriter( }) } - def addSourceFile(report: SourceFileReport) = { + def addSourceFile(report: SourceFileReport): Unit = { val repoRootDirStr = repoRootDir.getCanonicalPath + File.separator // create a name relative to the project root (rather than the module root) diff --git a/src/main/scala/org/scoverage/coveralls/CoverallsAuth.scala b/src/main/scala/org/scoverage/coveralls/CoverallsAuth.scala index 156929d..9680bd9 100644 --- a/src/main/scala/org/scoverage/coveralls/CoverallsAuth.scala +++ b/src/main/scala/org/scoverage/coveralls/CoverallsAuth.scala @@ -1,23 +1,18 @@ package org.scoverage.coveralls -import scala.io.Source -import io.circe._ -import io.circe.parser -import io.circe.generic.auto._ - /** The strategy to use when authenticating against Coveralls. */ -sealed trait CoverallsAuth +sealed trait CoverallsAuth extends Product with Serializable /** Auth strategy where a Coveralls-specific token is used. Works with every CI * service. */ -case class CoverallsRepoToken(token: String) extends CoverallsAuth +final case class CoverallsRepoToken(token: String) extends CoverallsAuth /** Auth strategy where a token specific to the CI service is used, such as a * GitHub token. Works on selected CI services supported by Coveralls. */ -case class CIServiceToken(token: String) extends CoverallsAuth +final case class CIServiceToken(token: String) extends CoverallsAuth /** Auth strategy where no token is passed. This seems to work for Travis. */ diff --git a/src/main/scala/org/scoverage/coveralls/CoverallsClient.scala b/src/main/scala/org/scoverage/coveralls/CoverallsClient.scala index 1f89652..b3ca68b 100644 --- a/src/main/scala/org/scoverage/coveralls/CoverallsClient.scala +++ b/src/main/scala/org/scoverage/coveralls/CoverallsClient.scala @@ -1,22 +1,21 @@ package org.scoverage.coveralls -import scala.io.{Codec, Source} +import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.scala.DefaultScalaModule -import scalaj.http.{MultiPart, Http} import scalaj.http.HttpOptions._ +import scalaj.http.{Http, MultiPart} + import java.io.File +import java.net.{InetAddress, Socket} import javax.net.ssl.{SSLSocket, SSLSocketFactory} -import java.net.{Socket, InetAddress} -import com.fasterxml.jackson.databind.ObjectMapper +import scala.io.{Codec, Source} class CoverallsClient(endpoint: String, httpClient: HttpClient) { - import CoverallsClient._ - - val mapper = newMapper + val mapper: ObjectMapper = newMapper def url: String = s"$endpoint/api/v1/jobs" - def newMapper = { + def newMapper: ObjectMapper = { val mapper = new ObjectMapper mapper.registerModule(DefaultScalaModule) mapper @@ -97,9 +96,10 @@ class ScalaJHttpClient extends HttpClient { } class OpenJdkSafeSsl extends SSLSocketFactory { - val child = SSLSocketFactory.getDefault.asInstanceOf[SSLSocketFactory] + val child: SSLSocketFactory = + SSLSocketFactory.getDefault.asInstanceOf[SSLSocketFactory] - val safeCiphers = Array( + val safeCiphers: Array[String] = Array( "SSL_RSA_WITH_RC4_128_MD5", "SSL_RSA_WITH_RC4_128_SHA", "TLS_RSA_WITH_AES_128_CBC_SHA", @@ -123,28 +123,32 @@ class OpenJdkSafeSsl extends SSLSocketFactory { .asInstanceOf[SSLSocketFactory] .getSupportedCipherSuites - def getDefaultCipherSuites = Array.empty - - def getSupportedCipherSuites = Array.empty + def getDefaultCipherSuites: Array[String] = Array.empty - def createSocket(p1: Socket, p2: String, p3: Int, p4: Boolean) = safeSocket( - child.createSocket(p1, p2, p3, p4) - ) + def getSupportedCipherSuites: Array[String] = Array.empty - def createSocket(p1: String, p2: Int) = safeSocket(child.createSocket(p1, p2)) + def createSocket(p1: Socket, p2: String, p3: Int, p4: Boolean): Socket = + safeSocket( + child.createSocket(p1, p2, p3, p4) + ) - def createSocket(p1: String, p2: Int, p3: InetAddress, p4: Int) = safeSocket( - child.createSocket(p1, p2, p3, p4) + def createSocket(p1: String, p2: Int): Socket = safeSocket( + child.createSocket(p1, p2) ) - def createSocket(p1: InetAddress, p2: Int) = safeSocket( + def createSocket(p1: String, p2: Int, p3: InetAddress, p4: Int): Socket = + safeSocket( + child.createSocket(p1, p2, p3, p4) + ) + + def createSocket(p1: InetAddress, p2: Int): Socket = safeSocket( child.createSocket(p1, p2) ) - def createSocket(p1: InetAddress, p2: Int, p3: InetAddress, p4: Int) = + def createSocket(p1: InetAddress, p2: Int, p3: InetAddress, p4: Int): Socket = safeSocket(child.createSocket(p1, p2, p3, p4)) - def safeSocket(sock: Socket) = sock match { + def safeSocket(sock: Socket): Socket = sock match { case ssl: SSLSocket => ssl.setEnabledCipherSuites(safeCiphers); ssl case other => other diff --git a/src/main/scala/org/scoverage/coveralls/CoverallsPlugin.scala b/src/main/scala/org/scoverage/coveralls/CoverallsPlugin.scala index 2011744..2153c5e 100644 --- a/src/main/scala/org/scoverage/coveralls/CoverallsPlugin.scala +++ b/src/main/scala/org/scoverage/coveralls/CoverallsPlugin.scala @@ -1,13 +1,11 @@ package org.scoverage.coveralls -import _root_.sbt.ScopeFilter -import _root_.sbt.ThisProject -import com.fasterxml.jackson.core.JsonEncoding import sbt.Keys._ -import sbt._ +import sbt.internal.util.ManagedLogger +import sbt.{ScopeFilter, ThisProject, _} -import scala.io.Source import java.io.File +import scala.io.Source object Imports { object CoverallsKeys { @@ -36,8 +34,8 @@ object CoverallsPlugin extends AutoPlugin { override def trigger = allRequirements val autoImport = Imports - import autoImport._ - import CoverallsKeys._ + import autoImport.* + import CoverallsKeys.* lazy val coveralls = taskKey[Unit]( "Uploads scala code coverage to coveralls.io" @@ -67,7 +65,7 @@ object CoverallsPlugin extends AutoPlugin { ) // must be outside of the 'coverageAggregate' task (see: https://github.com/sbt/sbt/issues/1095 or https://github.com/sbt/sbt/issues/780) def coverallsTask = Def.task { - implicit val log = streams.value.log + implicit val log: ManagedLogger = streams.value.log if (!coberturaFile.value.exists) { sys.error( @@ -167,13 +165,13 @@ object CoverallsPlugin extends AutoPlugin { } } - def apiHttpClient = new ScalaJHttpClient + def apiHttpClient: ScalaJHttpClient = new ScalaJHttpClient - def travisJobIdent = sys.env.get("TRAVIS_JOB_ID") + def travisJobIdent: Option[String] = sys.env.get("TRAVIS_JOB_ID") - def githubActionsRunIdent = sys.env.get("GITHUB_RUN_ID") + def githubActionsRunIdent: Option[String] = sys.env.get("GITHUB_RUN_ID") - def repoTokenFromFile(path: String) = { + def repoTokenFromFile(path: String): Option[String] = { try { val source = Source.fromFile(path) val repoToken = source.mkString.trim @@ -187,13 +185,13 @@ object CoverallsPlugin extends AutoPlugin { def userRepoToken( coverallsToken: Option[String], coverallsTokenFile: Option[String] - ) = + ): Option[String] = sys.env .get("COVERALLS_REPO_TOKEN") .orElse(coverallsToken) .orElse(coverallsTokenFile.flatMap(repoTokenFromFile)) - def userEndpoint(coverallsEndpoint: Option[String]) = + def userEndpoint(coverallsEndpoint: Option[String]): Option[String] = sys.env .get("COVERALLS_ENDPOINT") .orElse(coverallsEndpoint) diff --git a/src/main/scala/org/scoverage/coveralls/GitClient.scala b/src/main/scala/org/scoverage/coveralls/GitClient.scala index 57a3665..ddd3897 100644 --- a/src/main/scala/org/scoverage/coveralls/GitClient.scala +++ b/src/main/scala/org/scoverage/coveralls/GitClient.scala @@ -1,13 +1,15 @@ package org.scoverage.coveralls -import java.io.File -import java.nio.file.Files.lines - import org.eclipse.jgit.api.Git +import org.eclipse.jgit.lib.{Repository, StoredConfig} import org.eclipse.jgit.storage.file.FileRepositoryBuilder import org.scoverage.coveralls.GitClient.GitRevision import sbt.Logger +import java.io.File +import java.nio.file.Files.lines +import scala.util.matching.Regex + object GitClient { case class GitRevision( id: String, @@ -23,11 +25,11 @@ class GitClient(cwd: File)(implicit log: Logger) { import scala.collection.JavaConverters._ - val gitDirLineRegex = """^gitdir: (.*)""".r + val gitDirLineRegex: Regex = """^gitdir: (.*)""".r val gitFile = new File(cwd, ".git") - val resolvedGitDir = + val resolvedGitDir: File = if (gitFile.isFile) lines(gitFile.toPath) .iterator() @@ -44,8 +46,8 @@ class GitClient(cwd: File)(implicit log: Logger) { else gitFile - val repository = FileRepositoryBuilder.create(resolvedGitDir) - val storedConfig = repository.getConfig + val repository: Repository = FileRepositoryBuilder.create(resolvedGitDir) + val storedConfig: StoredConfig = repository.getConfig log.info("Repository = " + repository.getDirectory) def remotes: Seq[String] = { diff --git a/src/main/scala/org/scoverage/coveralls/Utils.scala b/src/main/scala/org/scoverage/coveralls/Utils.scala index 5cd6ebf..c0a33c4 100644 --- a/src/main/scala/org/scoverage/coveralls/Utils.scala +++ b/src/main/scala/org/scoverage/coveralls/Utils.scala @@ -1,6 +1,7 @@ package org.scoverage.coveralls import java.io.File +import scala.annotation.tailrec object Utils { def mkFileFromPath(path: Seq[String]): File = { @@ -9,6 +10,7 @@ object Utils { mkFileFromPath(new File(p), ps) } + @tailrec def mkFileFromPath(base: File, path: Seq[String]): File = path match { case p :: ps => mkFileFromPath(new File(base, p), ps) case _ => base diff --git a/src/main/scala/org/scoverage/coveralls/XmlHelper.scala b/src/main/scala/org/scoverage/coveralls/XmlHelper.scala index a9209d1..c4e64b2 100644 --- a/src/main/scala/org/scoverage/coveralls/XmlHelper.scala +++ b/src/main/scala/org/scoverage/coveralls/XmlHelper.scala @@ -1,10 +1,9 @@ package org.scoverage.coveralls -import java.io.{File, FileInputStream} -import javax.xml.parsers.SAXParserFactory - import org.xml.sax.InputSource +import java.io.{File, FileInputStream} +import javax.xml.parsers.SAXParserFactory import scala.util.Try import scala.xml.XML diff --git a/src/test/scala/org/scoverage/coveralls/CIServiceTest.scala b/src/test/scala/org/scoverage/coveralls/CIServiceTest.scala index fc62740..8391faf 100644 --- a/src/test/scala/org/scoverage/coveralls/CIServiceTest.scala +++ b/src/test/scala/org/scoverage/coveralls/CIServiceTest.scala @@ -1,11 +1,7 @@ package org.scoverage.coveralls -import org.scalatest.wordspec.AnyWordSpec import org.scalatest.matchers.should.Matchers - -import sbt.ConsoleLogger - -import scala.Option +import org.scalatest.wordspec.AnyWordSpec class CIServiceTest extends AnyWordSpec with Matchers { diff --git a/src/test/scala/org/scoverage/coveralls/CoberturaMultiSourceReaderTest.scala b/src/test/scala/org/scoverage/coveralls/CoberturaMultiSourceReaderTest.scala index de74da5..acbb8b9 100644 --- a/src/test/scala/org/scoverage/coveralls/CoberturaMultiSourceReaderTest.scala +++ b/src/test/scala/org/scoverage/coveralls/CoberturaMultiSourceReaderTest.scala @@ -1,17 +1,17 @@ package org.scoverage.coveralls -import java.io.{FileNotFoundException, File} - -import org.scalatest.wordspec.AnyWordSpec -import org.scalatest.matchers.should.Matchers import org.scalatest.BeforeAndAfterAll -import org.scalatest.Ignore +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import sbt.util.AbstractLogger + +import java.io.{File, FileNotFoundException} class CoberturaMultiSourceReaderTest extends AnyWordSpec with BeforeAndAfterAll with Matchers { - implicit val log = sbt.Logger.Null + implicit val log: AbstractLogger = sbt.Logger.Null val resourceDir = Utils.mkFileFromPath(Seq(".", "src", "test", "resources")) val sourceDirA = diff --git a/src/test/scala/org/scoverage/coveralls/CoverallPayloadWriterTest.scala b/src/test/scala/org/scoverage/coveralls/CoverallPayloadWriterTest.scala index 914d618..b484a24 100644 --- a/src/test/scala/org/scoverage/coveralls/CoverallPayloadWriterTest.scala +++ b/src/test/scala/org/scoverage/coveralls/CoverallPayloadWriterTest.scala @@ -1,17 +1,17 @@ package org.scoverage.coveralls import java.io.{File, StringWriter, Writer} - import com.fasterxml.jackson.core.JsonFactory import org.scalatest.wordspec.AnyWordSpec import org.scalatest.matchers.should.Matchers import org.scalatest.BeforeAndAfterAll +import sbt.util.AbstractLogger class CoverallPayloadWriterTest extends AnyWordSpec with BeforeAndAfterAll with Matchers { - implicit val log = sbt.Logger.Null + implicit val log: AbstractLogger = sbt.Logger.Null val resourceDir = Utils.mkFileFromPath(Seq(".", "src", "test", "resources")) @@ -71,7 +71,7 @@ class CoverallPayloadWriterTest new StringWriter(), Some("testRepoToken"), Some(testService), - false + parallel = false ) payloadWriter.start() @@ -92,7 +92,7 @@ class CoverallPayloadWriterTest new StringWriter(), Some("testRepoToken"), None, - false + parallel = false ) payloadWriter.start() @@ -120,7 +120,7 @@ class CoverallPayloadWriterTest new StringWriter(), Some("testRepoToken"), Some(testService), - false + parallel = false ) payloadWriter.start() @@ -150,7 +150,7 @@ class CoverallPayloadWriterTest new StringWriter(), Some("testRepoToken"), Some(TravisCI), - false + parallel = false ) payloadWriter.addSourceFile( SourceFileReport( @@ -190,7 +190,7 @@ class CoverallPayloadWriterTest new StringWriter(), Some("testRepoToken"), Some(TravisCI), - false + parallel = false ) payloadWriter.start() @@ -201,7 +201,12 @@ class CoverallPayloadWriterTest "include parallel correctly" in { val (payloadWriter, writer) = - coverallsWriter(new StringWriter(), Some("testRepoToken"), None, true) + coverallsWriter( + new StringWriter(), + Some("testRepoToken"), + None, + parallel = true + ) payloadWriter.start() payloadWriter.flush() diff --git a/src/test/scala/org/scoverage/coveralls/CoverallsClientTest.scala b/src/test/scala/org/scoverage/coveralls/CoverallsClientTest.scala index eb34662..28ce8be 100644 --- a/src/test/scala/org/scoverage/coveralls/CoverallsClientTest.scala +++ b/src/test/scala/org/scoverage/coveralls/CoverallsClientTest.scala @@ -1,16 +1,13 @@ package org.scoverage.coveralls -import java.io.File -import java.net.HttpURLConnection - -import org.scalatest.wordspec.AnyWordSpec -import org.scalatest.matchers.should.Matchers import org.scalatest.BeforeAndAfterAll - -import scala.util.Try +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec import scalaj.http.Http import scalaj.http.HttpOptions._ +import scala.util.Try + class CoverallsClientTest extends AnyWordSpec with BeforeAndAfterAll diff --git a/src/test/scala/org/scoverage/coveralls/GitClientTest.scala b/src/test/scala/org/scoverage/coveralls/GitClientTest.scala index ccdfc6e..0ded237 100644 --- a/src/test/scala/org/scoverage/coveralls/GitClientTest.scala +++ b/src/test/scala/org/scoverage/coveralls/GitClientTest.scala @@ -1,19 +1,18 @@ package org.scoverage.coveralls -import java.io.File - -import org.scalatest.wordspec.AnyWordSpec -import org.scalatest.matchers.should.Matchers -import org.scalatest.BeforeAndAfterAll import org.eclipse.jgit.api.Git - +import org.scalatest.BeforeAndAfterAll +import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec import sbt.ConsoleLogger +import java.io.File + class GitClientTest extends AnyWordSpec with BeforeAndAfterAll with Matchers { - implicit val log = ConsoleLogger(System.out) + implicit val log: ConsoleLogger = ConsoleLogger(System.out) - var git: GitClient = null + var git: GitClient = _ override def beforeAll(): Unit = { // Create local repository diff --git a/src/test/scala/org/scoverage/coveralls/UtilsTest.scala b/src/test/scala/org/scoverage/coveralls/UtilsTest.scala index 5a31cf6..f79b3d4 100644 --- a/src/test/scala/org/scoverage/coveralls/UtilsTest.scala +++ b/src/test/scala/org/scoverage/coveralls/UtilsTest.scala @@ -1,9 +1,9 @@ package org.scoverage.coveralls -import java.io.File - -import org.scalatest.wordspec.AnyWordSpec import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec + +import java.io.File class UtilsTest extends AnyWordSpec with Matchers { "mkFileFromPath" when { diff --git a/src/test/scala/org/scoverage/coveralls/XmlHelperTest.scala b/src/test/scala/org/scoverage/coveralls/XmlHelperTest.scala index 3b080a7..00b73eb 100644 --- a/src/test/scala/org/scoverage/coveralls/XmlHelperTest.scala +++ b/src/test/scala/org/scoverage/coveralls/XmlHelperTest.scala @@ -1,10 +1,9 @@ package org.scoverage.coveralls -import java.io.File - -import org.scalatest.wordspec.AnyWordSpec import org.scalatest.matchers.should.Matchers +import org.scalatest.wordspec.AnyWordSpec +import java.io.File import scala.xml.XML class XmlHelperTest extends AnyWordSpec with Matchers {