{"id":32163234,"url":"https://github.com/killy971/hpc-coveralls","last_synced_at":"2026-02-19T13:34:33.130Z","repository":{"id":14810331,"uuid":"17532706","full_name":"killy971/hpc-coveralls","owner":"killy971","description":"coveralls.io support for haskell code coverage with hpc","archived":false,"fork":false,"pushed_at":"2023-09-06T11:28:39.000Z","size":209,"stargazers_count":60,"open_issues_count":26,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-13T01:43:43.021Z","etag":null,"topics":["coverage-data","coverage-report","haskell"],"latest_commit_sha":null,"homepage":"http://hackage.haskell.org/package/hpc-coveralls","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/killy971.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2014-03-08T01:40:44.000Z","updated_at":"2023-09-06T11:25:53.000Z","dependencies_parsed_at":"2023-09-27T19:35:42.156Z","dependency_job_id":"ad78067b-71ad-42fd-8f8e-58af1cad55ab","html_url":"https://github.com/killy971/hpc-coveralls","commit_stats":{"total_commits":274,"total_committers":15,"mean_commits":"18.266666666666666","dds":"0.36861313868613144","last_synced_commit":"b6f2ac892aa8e9e40c94411f6c52de19cddf52c8"},"previous_names":["guillaume-nargeot/hpc-coveralls"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/killy971/hpc-coveralls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killy971%2Fhpc-coveralls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killy971%2Fhpc-coveralls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killy971%2Fhpc-coveralls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killy971%2Fhpc-coveralls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/killy971","download_url":"https://codeload.github.com/killy971/hpc-coveralls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killy971%2Fhpc-coveralls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29614980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["coverage-data","coverage-report","haskell"],"created_at":"2025-10-21T14:17:53.990Z","updated_at":"2026-02-19T13:34:33.116Z","avatar_url":"https://github.com/killy971.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"hpc-coveralls\n=============\n\n![GitHub Actions status](https://github.com/killy971/hpc-coveralls/workflows/Haskell%20CI/badge.svg) [![Gitter chat](http://img.shields.io/badge/gitter-chat--room-brightgreen.svg)](https://gitter.im/guillaume-nargeot/hpc-coveralls) [![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)](https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29) [![Version on Hackage](https://img.shields.io/hackage/v/hpc-coveralls.svg)](http://hackage.haskell.org/package/hpc-coveralls) [![Stories in Progress](https://badge.waffle.io/guillaume-nargeot/hpc-coveralls.svg?label=in%20progress\u0026title=In%20Progress)](https://waffle.io/guillaume-nargeot/hpc-coveralls)\n\nhpc-coveralls converts and sends Haskell projects hpc code coverage to [coverall.io](http://coveralls.io/).\n\nAt the moment, only [Travis CI](http://travis-ci.org) has been tested, but hpc-coveralls should be compatible with other CI services (Check `HpcCoverallsMain` [source](https://github.com/guillaume-nargeot/hpc-coveralls/blob/master/src/HpcCoverallsMain.hs) for the list).\n\nhpc-coveralls is still under development and any contributions are welcome!\n\n# Usage\n\n## Travis CI\n\nBelow is the simplest example of configuration for your project `.travis.yml`:\n```yaml\nlanguage: haskell\nghc: 7.8\nscript:\n  - cabal configure --enable-tests --enable-library-coverage \u0026\u0026 cabal build \u0026\u0026 cabal test\nafter_script:\n  - cabal install hpc-coveralls\n  - hpc-coveralls [options] [test-suite-names]\n```\n\nWhen building with Cabal 1.22 or a newer version, use the `--enable-coverage` flag instead of `--enable-library-coverage`.\n\nIf the build fails during the test phase with an error message starting by \"hpc:\", just replace the `cabal test` command by `run-cabal-test`, as in the following example:\n```yaml\nbefore_install:\n  - cabal install hpc-coveralls\nscript:\n  - cabal configure --enable-tests --enable-library-coverage \u0026\u0026 cabal build\n  - run-cabal-test [options] [cabal-test-options]\nafter_script:\n  - hpc-coveralls [options] [test-suite-names]\n```\n\nThis will prevent the build to fail because of hpc related reasons, which are usually not fatal and should not affect the coverage data. Details are available in the next section.\n\nYou may also experience some issues related to your project dependencies, which can be solved by using the `--avoid-reinstalls`/`--force-reinstalls` flags.\u003c/br\u003e\nAnother way to solve problems related dependencies is to install hpc-coveralls in a sandbox, as in the example below:\n```yaml\nafter_script:\n  - cabal sandbox init \u0026\u0026 cabal install hpc-coveralls\n  - .cabal-sandbox/bin/hpc-coveralls [options] [test-suite-names]\n```\n\nFor a real world example usage, please refer to [this-project](https://github.com/guillaume-nargeot/project-euler-haskell) `.travis.yml` file ([result on coveralls](https://coveralls.io/r/guillaume-nargeot/project-euler-haskell)).\u003cbr/\u003e\nOther real world examples can be found on this [wiki page](https://github.com/guillaume-nargeot/hpc-coveralls/wiki/List-of-repositories-using-hpc-coveralls) which contains a list of GitHub repositories using hpc-coveralls.\n\n## The run-cabal-test command\n\nUnder certain conditions related to the project structure and the version of hpc, `cabal test` may output an error message and exit with the error code `1`, which would result in a build failure.\u003cbr/\u003e\n\nTo prevent this from happening, hpc-coveralls provides the `run-cabal-test` command which runs `cabal test` and returns with `0` if the following regular expression never matches any line of the output:\n\n```perl\n/^Test suite .*: FAIL$/\n```\n\nBelow are some of the conditions under which you will likely need to use `run-cabal-test`:\n- when using GHC 7.6 (hpc 0.6 known issue)\n- when using GHC 7.8 with multiple test suites covering the same module(s) (issue [#18](https://github.com/guillaume-nargeot/hpc-coveralls/issues/18)) (fixed in GHC 7.10)\n\n### Options\n\nThe `--cabal-name` option can be used to specify a custom executable name instead of the default `cabal` when calling `cabal test`.\u003cbr/\u003e\nBelow is an example which can be useful for projects with a Travis configuration based on [multi-ghc-travis](https://github.com/hvr/multi-ghc-travis):\n\n```bash\nrun-cabal-test --cabal-name=cabal-1.20\n```\n\n## The hpc-coveralls command\n\nThis command parses the hpc generated output, converts its to Coveralls json format and finally sends it to coveralls.io over http.\u003cbr/\u003e\nMultiple test suites can be specified, in which case the coverage report will be made of the merged coverage data generated by the specified test suites.\u003cbr/\u003e\nFor example, if your test suite are named `test1` and `test2`, use the command as follows:\n\n```bash\nhpc-coveralls test1 test2\n```\n\n### Options\n\n#### --exclude-dir\n\nThe `--exclude-dir` option allows to exclude source files located under a given directory from the coverage report.\u003cbr/\u003e\nYou can exclude source files located under the `test/` directory by using this option as in the following example:\n\n```bash\nhpc-coveralls --exclude-dir=test [test-suite-names]\n```\n\nYou can specify multiple excluded folders by using the following example syntax:\n\n```bash\nhpc-coveralls --exclude-dir=test1 --exclude-dir=test2 [test-suite-names]\n```\n\n#### --coverage-mode\n\nAs Coveralls doesn't support partial-line coverage yet, hpc-coveralls currently converts hpc coverage data into line based coverage data, which is the only format supported at the moment.\nThe `--coverage-mode` option allows to configure how the coverage data is converted into Coveralls format, based on your needs.\u003cbr/\u003e\nBelow are the two modes currently available, with an explanation of what the hit count values mean.\n\n`--coverage-mode=AllowPartialLines` (default):\n- `0` : the line is never hit,\n- `1` : the line is partially covered,\n- `2` : the line is fully covered.\n\nNote that `AllowPartialLines` conversion mode follows the same convention as the one used by [cloverage](https://github.com/lshift/cloverage) coveralls output for Clojure projects code coverage.\n\n`--coverage-mode=StrictlyFullLines`:\n- `0` : the line is never hit or only partially covered,\n- `1` : the line is fully covered.\n\nPlease also note that there is an [open issue](https://github.com/lemurheavy/coveralls-public/issues/216) on coveralls issue tracker in order to improve this (add support for partial line coverage).\n\n#### --repo-token\n\nThis option allows to specify your repo token when sending the report to coveralls.io.\n\n#### --display-report\n\nThis boolean option prints the raw json coverage report to be sent to coveralls.io.\n\n#### --dont-send\n\nThis boolean option prevents hpc-coveralls from sending the coverage report to coveralls.io.\nThis option can be used together with `--display-report` for testing purpose.\u003cbr/\u003e\nFor example, you can try various combinations of the other options and confirm the difference in the resulting report outputs.\n\n#### --curl-verbose\n\nThis boolean option enables curl verbose mode and prints the raw json response received after posting the coverage report to coveralls.io.\n\n#### --cabal-file\n\nUse this option to specify the cabal file of the coverage report target package.\nThis might be required in some cases, especially when building with cabal \u003e= 1.22 and ghc \u003e= 7.10, although hpc-coveralls assumes the package cabal file to be the unique file of extension \".cabal\" in the current directory if it exists.\nFor further details check [this issue](https://github.com/guillaume-nargeot/hpc-coveralls/issues/44).\n\n#### --service-name\n\nThis option allows you to override the `service_name` value from the report sent to coveralls.io.\nYou will have to specify it for example when using Travis-pro as in the example below as there is currently no way to programmatically determine:\n```bash\n--service-name=travis-pro\n```\n\n# Limitations\n\nBecause of the way hpc works, coverage data is only generated for modules that are referenced directly or indirectly by the test suites.\nAs a result, the total package coverage computed by coveralls may be higher than what it really is.\nAn option will be added soon in order to allow specifying source folders to include in the total coverage computation.\n\n# Contributing\n\nhpc-coveralls is still under development and any contributions are welcome!\n\n[Future Plans and Ideas](https://github.com/guillaume-nargeot/hpc-coveralls/wiki/Future-Plans-and-Ideas)\n\nPlease share your comments and suggestions on hpc-coveralls [Gitter channel](https://gitter.im/guillaume-nargeot/hpc-coveralls)!\n\n# License\n\nBSD3 ([tl;dr](https://tldrlegal.com/license/bsd-3-clause-license-(revised)))\n\n# Notes\n\n- HPC publication: http://ittc.ku.edu/~andygill/papers/Hpc07.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilly971%2Fhpc-coveralls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkilly971%2Fhpc-coveralls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilly971%2Fhpc-coveralls/lists"}