{"id":28442352,"url":"https://github.com/travisbrown/coverages","last_synced_at":"2026-02-15T03:31:16.984Z","repository":{"id":26271429,"uuid":"29718797","full_name":"travisbrown/coverages","owner":"travisbrown","description":"A sandbox for experimenting with Scala code coverage tools","archived":false,"fork":false,"pushed_at":"2015-01-24T02:07:42.000Z","size":202,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T03:43:26.922Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travisbrown.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-23T05:51:15.000Z","updated_at":"2015-01-25T11:22:37.000Z","dependencies_parsed_at":"2022-08-26T20:21:50.194Z","dependency_job_id":null,"html_url":"https://github.com/travisbrown/coverages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/travisbrown/coverages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fcoverages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fcoverages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fcoverages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fcoverages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travisbrown","download_url":"https://codeload.github.com/travisbrown/coverages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fcoverages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-06T06:04:45.607Z","updated_at":"2026-02-15T03:31:16.972Z","avatar_url":"https://github.com/travisbrown.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scala code coverage sandbox\n\nThis repository contains some Scala projects with tests. Some of these tests\nare bad. We want to see whether our code coverage tools can tell us anything\nuseful about how bad they are. We're currently only comparing the SBT plugins\nfor [Scoverage](https://github.com/scoverage/sbt-scoverage) and\n[JaCoCo](https://github.com/sbt/jacoco4sbt).\n\nThe following command will run the coverage tools, update the README, and\nprepare the reports for publication:\n\n```\nsbt clean coverage test jacoco:cover readme make-site\n```\n\nYou can add `ghpages-push-site` if you're me and want to publish the reports\nto this project's GitHub Pages site.\n\nI'll aim to add examples as I find time and think of things to try. Pull\nrequests are also welcome.\n\n## Example 1\n\nWe've got this algebraic data type with an ordering:\n\n\u003c!-- code:Foo --\u003e\n``` scala\nsealed trait Foo\ncase class Bar(s: String) extends Foo\ncase object Baz extends Foo\n\nobject Foo {\n  implicit val fooOrdering: Ordering[Foo] = Ordering.fromLessThan {\n    case (Bar(_), Baz) =\u003e true\n    case (Bar(a), Bar(b)) =\u003e a \u003c b\n    case (_, _) =\u003e false\n  }\n}\n```\n\nAnd we've got a [ScalaCheck](https://www.scalacheck.org/) specification that\nconfirms that instances of the `Bar` constructor are properly ordered.\n\n\u003c!-- test:FooSpecification --\u003e\n``` scala\nimport org.scalacheck.Properties\nimport org.scalacheck.Prop.forAll\n\nimport Ordering.Implicits._\n\nobject FooSpecification extends Properties(\"Foo\") {\n  property(\"ordering Bars\") = forAll { (a: String, b: String) =\u003e\n    (Bar(a): Foo) \u003c (Bar(b): Foo) == a \u003c b\n  }\n}\n```\n\nThis isn't very good—we should be checking that any `Bar` precedes `Baz` as\nwell. Here's what our code coverage tools have to say:\n\n* [Scoverage](https://travisbrown.github.io/coverages/examples/001/scoverage/)\n* [JaCoCo](https://travisbrown.github.io/coverages/examples/001/jacoco/)\n\nScoverage shows exactly which cases aren't being tested, but JaCoCo isn't very\nhelpful here.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravisbrown%2Fcoverages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravisbrown%2Fcoverages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravisbrown%2Fcoverages/lists"}