{"id":13693099,"url":"https://github.com/anykeyh/crystal-coverage","last_synced_at":"2025-04-30T22:23:56.472Z","repository":{"id":47619938,"uuid":"130496521","full_name":"anykeyh/crystal-coverage","owner":"anykeyh","description":"Coverage tool for Crystal lang","archived":false,"fork":false,"pushed_at":"2022-05-23T11:27:04.000Z","size":61,"stargazers_count":63,"open_issues_count":9,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T20:33:38.576Z","etag":null,"topics":["coverage","crystal","crystal-coverage","spec"],"latest_commit_sha":null,"homepage":null,"language":"Crystal","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/anykeyh.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}},"created_at":"2018-04-21T17:26:05.000Z","updated_at":"2024-06-29T10:43:16.000Z","dependencies_parsed_at":"2022-09-25T11:46:46.515Z","dependency_job_id":null,"html_url":"https://github.com/anykeyh/crystal-coverage","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/anykeyh%2Fcrystal-coverage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anykeyh%2Fcrystal-coverage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anykeyh%2Fcrystal-coverage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anykeyh%2Fcrystal-coverage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anykeyh","download_url":"https://codeload.github.com/anykeyh/crystal-coverage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251790411,"owners_count":21644215,"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","crystal","crystal-coverage","spec"],"created_at":"2024-08-02T17:01:05.548Z","updated_at":"2025-04-30T22:23:56.449Z","avatar_url":"https://github.com/anykeyh.png","language":"Crystal","funding_links":[],"categories":["Testing"],"sub_categories":[],"readme":"# crystal-coverage\nCoverage tool for Crystal lang\n\n## Welcome\n\nBefore you start, you must understand this is a proof of concept. I'm not happy\nwith the current code implementation.\n\nLot of features and options will change in the future.\n\nThe code will probably be rebuilt almost from scratch\n\nNote also than it hasn't yet been properly tested. Ironic, for a cover tool, isn't it? :-)\nanyway, if you're bold enough to give a try, read the getting started below !\n\n## Installation\n\nJust add this line in your `shard.yml` file\n\n```yaml\ndevelopment_dependencies:\n  coverage:\n    github: anykeyh/crystal-coverage\n```\n\nWait for the binary to compile. The binary will be build in `bin/crystal-coverage`\n\n## Usage\n\n```\ncrystal-coverage spec/myfile_spec1.cr spec/myfile_spec2.cr\n```\n\nCoverage file will be recreated after your software run on `coverage/` folder.\n\n## Bugs\n\nThere's probably dozen of bugs. Please fill issues and PR are welcome.\n\nThe library will evolve, so don't hesitate to `shards update` and test with the\nlatest release before submitting an issue.\n\nDue to some limitation, there's probably still a non-zero chance your code will\nnot compile with the coverage instrumentations.\n\nIn this case, you can give a look to the generated output using the `-p` argument:\n\n```\ncrystal-coverage src/main.cr -p\n```\n\nWhen you fill issues, would be great to isolate the code which fail to load, so I\ncan add it to my code library and fix the library.\n\n## Performances\n\nThe performances will slightly degrade using the coverage tool. Note the\nsoftware is executed without release flag.\n\nTo test in `--release` mode, you can do:\n\n```\ncrystal-coverage src/main.cr -p | crystal eval --release\n```\n\n## How does it works?\n\nIt uses ASTNode parsing to inject coverage instrumentations and reflag the lines\nof code using `#\u003cloc ...\u003e` directive\n\nIt covers only the relative files (e.g. require starting with `.`) inside your\nproject directory.\n\nIt then generate a report in the directory `/coverage/` relative to your project\n\n## Planned features\n\n- Binding with coveralls\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanykeyh%2Fcrystal-coverage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanykeyh%2Fcrystal-coverage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanykeyh%2Fcrystal-coverage/lists"}