Giter VIP home page Giter VIP logo

Comments (1)

olatheander avatar olatheander commented on July 17, 2024

After investigating a bit more; after doing a coverage;test after sbt startup there is scoverage.measurements.**** file created e.g:

$ cd target/scala-3.3.1
$ tree scoverage-data/                                                                                                                                                                                                                                                                                                                           scoverage-data/
├── scoverage.coverage
└── scoverage.measurements.58cb6c3d-238f-4782-90d9-f698d1b8bf19.187

but after a clean and consecutive coverage;test this file is not created anymore, only the scoverage.coverage file is recreated. Without the measurements file, the coverage is reported to be 0%.

I verified this by hard-coding the measurements value in loadCoverage in which I added a log statement to collect the values:

  private def loadCoverage(
      crossTarget: File,
      log: Logger,
      sourceRoot: File
  ): Option[Coverage] = {
     ...
     ..
      log.info(s"Reading scoverage measurements...")
      val measurementFiles = IOUtils.findMeasurementFiles(dataDir)
      // val measurements = IOUtils.invoked(measurementFiles)
      val measurements = Set((0, ""), (2, ""), (1, ""))
      log.info(s"measurements: ${measurements}")
      coverage.apply(measurements)
      Some(coverage)

    } else {
      None
    }
  }

With the hard-coded Set() the reported coverage was 37.50% every time despite the measurements file was missing (obviously since I hard-coded the values).

However, this makes me believe that perhaps it's more of a dotty issue than a sbt-coverage issue?

from sbt-scoverage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.