sbt-coverage
sbt-coverage copied to clipboard
Downloadable v0.1 is missing patch for parameterizing report format
Hi Stuart,
Thanks for the tool, it looks nice.
I ran into a small glitch. Your instructions worked great, until I tried 'coverage report emmaxml'. This failed:
coverage report emmaxml [warn] Unknown command: report emmaxml
It turns out that the downloadable version 0.1 (on github and in the scala-tools Maven repo) does not include Robert Macomber's patch. Here is a diff of the results of git clone (has the patch) vs. the contents of the downloadable 0.1 zip file (is missing the patch):
diff -r sbt-coverage/src/main/scala/com/proinnovate/sbt/coverage/SbtCoverageProcessor.scala sroebuck-sbt-coverage-99f8324/src/main/scala/com/proinnovate/sbt/coverage/SbtCoverageProcessor.scala 19,20d18 < val ReportPattern = "report((?: [a-z]))".r < 50c48 < case ReportPattern(arg) =>
case "report" =>
60,63c58 < < val rawFormats = arg.split(' ').filter(!_.isEmpty) < val formats = if(rawFormats.isEmpty) List("html") else rawFormats < testCoverageReport(scalaProject, formats)
testCoverageReport(scalaProject)
190c185 < private def testCoverageReport(project: BasicScalaProject, formats: Iterable[String]) {
private def testCoverageReport(project: BasicScalaProject) { 202a198 val formats = List("html") Only in sbt-coverage/: target
I compiled the git clone and replaced
project/boot/scala-2.7.7/sbt-processors/com.proinnovate/sbt-coverage/0.1/sbt-coverage_2.7.7-0.1.jar
with the new jar; then coverage report emmaxml worked like a charm.
I also found your blog post about 0.2, at http://implicit.ly/sbt-coverage-02. Perhaps all that's missing is a commit of the 0.2 README and downloadable to github, and push to Maven at scala-tools?
Cheers,
Stefan
After a bit more mucking about I was able to get Jenkins' Emma plug-in to create a coverage trend report using the sbt-coverage emma.xml output. Very nice!
But, I had to disable the Jenkins/git update/clean commands, so the builds are not quite how they should be. A version 0.2 would fix that. Let me know if there is anything I can do to help.
Stefan,
Apologies for the lack of response here. I've not had the opportunity to look at this for a while but hope to again, particularly when the next stage of SBT has become clearer.
Stuart.
stebbi mailto:[email protected] 30 April 2011 8:37pm
Hi Stuart,
Thanks for the tool, it looks nice.
[warn] Unknown command: report emmaxml
It turns out that the downloadable version 0.1 (on github and in the scala-tools Maven repo) does not include Robert Macomber's patch. Here is a diff of the results of git clone (has the patch) vs. the contents of the downloadable 0.1 zip file (is missing the patch):
diff -r sbt-coverage/src/main/scala/com/proinnovate/sbt/coverage/SbtCoverageProcessor.scala sroebuck-sbt-coverage-99f8324/src/main/scala/com/proinnovate/sbt/coverage/SbtCoverageProcessor.scala 19,20d18 < val ReportPattern = "report((?: [a-z]))".r < 50c48
< case ReportPattern(arg) =>
case "report" => 60,63c58 < < val rawFormats = arg.split(' ').filter(!_.isEmpty) < val formats = if(rawFormats.isEmpty) List("html") else rawFormats
< testCoverageReport(scalaProject, formats)
testCoverageReport(scalaProject) 190c185 < private def testCoverageReport(project: BasicScalaProject, formats:
Iterable[String]) {
private def testCoverageReport(project: BasicScalaProject) { 202a198 val formats = List("html") Only in sbt-coverage/: target
I compiled the git clone and replaced
project/boot/scala-2.7.7/sbt-processors/com.proinnovate/sbt-coverage/0.1/sbt-coverage_2.7.7-0.1.jar
with the new jar; then coverage report emmaxml worked like a charm.
I also found your blog post about 0.2, at http://implicit.ly/sbt-coverage-02. Perhaps all that's missing is a commit of the 0.2 README and downloadable to github, and push to Maven at scala-tools?
Cheers,
Stefan