{"id":17695817,"url":"https://github.com/nadako/coverme","last_synced_at":"2026-01-07T23:39:28.172Z","repository":{"id":145325696,"uuid":"68315716","full_name":"nadako/coverme","owner":"nadako","description":"Code coverage for Haxe","archived":false,"fork":false,"pushed_at":"2017-11-01T21:08:47.000Z","size":64,"stargazers_count":11,"open_issues_count":4,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-06T05:21:53.700Z","etag":null,"topics":["coverage","haxe"],"latest_commit_sha":null,"homepage":null,"language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nadako.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-15T17:28:45.000Z","updated_at":"2018-07-19T10:16:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"18060af6-7ee9-4be2-848f-0702a983f60b","html_url":"https://github.com/nadako/coverme","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadako%2Fcoverme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadako%2Fcoverme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadako%2Fcoverme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nadako%2Fcoverme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nadako","download_url":"https://codeload.github.com/nadako/coverme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246395590,"owners_count":20770243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["coverage","haxe"],"created_at":"2024-10-24T14:07:04.424Z","updated_at":"2026-01-07T23:39:28.108Z","avatar_url":"https://github.com/nadako.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoverMe\n\nThis library provides code coverage for Haxe projects.\n\n**STATUS**: PRE-ALPHA (very much work in progress, trying out stuff, NOT ready for real world)\n\nIt is heavily inspired by [mcover](https://github.com/massiveinteractive/mcover), however\nit's written from scratch in modern Haxe for modern Haxe.\n\nNot much more to say right now, since it's in very early stage of development.\n\nHere's something to play with though: https://nadako.github.io/coverme/\n\n## Usage\n\nDon't use it, it's not ready. I'll update the README when it's ready for public usage. :)\n\n## Implementation\n\nIt's implemented as the build macro that instruments Haxe expressions by adding additional\nlogging function call to each \"statement\" and \"branch\", e.g. this:\n\n```haxe\nclass MyClass {\n    static function myFunction(a:Int) {\n        if (a == 10) {\n            trace(\"Ten!\");\n        } else {\n            trace(\"Not ten!\");\n        }\n    }\n}\n```\n\nbecomes this (JavaScript output):\n\n```js\nMyClass.myFunction = function(a) {\n    coverme_Logger.logStatement(0);\n    if(coverme_Logger.logBranch(1,a == 10)) {\n        coverme_Logger.logStatement(2);\n        console.log(\"Ten!\");\n    } else {\n        coverme_Logger.logStatement(3);\n        console.log(\"Not ten!\");\n    }\n};\n```\n\nAs you can see, there are `logStatement` calls added before each statement in a block.\nThe numbers are identifiers of a statement, created at compile-time. And then there's a\nmapping from these identifiers to objects containing information about statements, such\nas file and position (also created at compile-time).\n\nWhen you run the code, injected `logStatement`s will increase execution counters\nof their corresponding statements. The `logBranch` is almost the same,\nbut has two counters (for `true` and `false` evaluation results).\n\nAfter running the code in question, we have all counters there and we can analyze the results\nand report statements and branches that wasn't evaluated once in a nice HTML page:\n\n![](http://i.imgur.com/vBEIZXk.gif)\n\n## Obligatory meme\n\n![](http://weknowmemes.com/wp-content/uploads/2013/01/cover-me-comic.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadako%2Fcoverme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnadako%2Fcoverme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnadako%2Fcoverme/lists"}