{"id":17297045,"url":"https://github.com/adamniederer/cov","last_synced_at":"2025-04-06T03:06:27.203Z","repository":{"id":16592114,"uuid":"65506338","full_name":"AdamNiederer/cov","owner":"AdamNiederer","description":"An emacs extension for displaying coverage data on your code","archived":false,"fork":false,"pushed_at":"2025-01-26T23:33:54.000Z","size":207,"stargazers_count":87,"open_issues_count":9,"forks_count":18,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T02:07:39.901Z","etag":null,"topics":["clover","coverage","coverage-data","coveralls","emacs","gcov","lcov","profiling"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdamNiederer.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-08-11T22:44:48.000Z","updated_at":"2025-03-25T16:17:19.000Z","dependencies_parsed_at":"2024-04-13T17:04:26.301Z","dependency_job_id":"fca3c574-b7d5-4402-9451-eb435082d169","html_url":"https://github.com/AdamNiederer/cov","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/AdamNiederer%2Fcov","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdamNiederer%2Fcov/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdamNiederer%2Fcov/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdamNiederer%2Fcov/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdamNiederer","download_url":"https://codeload.github.com/AdamNiederer/cov/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247427006,"owners_count":20937201,"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":["clover","coverage","coverage-data","coveralls","emacs","gcov","lcov","profiling"],"created_at":"2024-10-15T11:14:33.650Z","updated_at":"2025-04-06T03:06:27.172Z","avatar_url":"https://github.com/AdamNiederer.png","language":"Emacs Lisp","readme":"![GPLv3](https://img.shields.io/badge/license-GPLv3-brightgreen.svg)\n[![Build Status](https://travis-ci.org/AdamNiederer/cov.svg?branch=master)](https://travis-ci.org/AdamNiederer/cov)\n[![MELPA](http://melpa.org/packages/cov-badge.svg)](http://melpa.org/#/cov)\n\n[`gcov`]: https://gcc.gnu.org/onlinedocs/gcc/Gcov.html\n \"gcov — a Test Coverage Program\"\n[`lcov`]: https://github.com/linux-test-project/lcov\n \"lcov — a graphical frontend for gcov\"\n[`coverage.py`]: https://coverage.readthedocs.io\n \"Coverage.py is a tool for measuring code coverage of Python programs.\"\n[`clover`]: https://openclover.org\n \"OpenClover — Java, Groovy and AspectJ code coverage tool\"\n[`Coveralls`]: https://coveralls.io\n \"Coveralls — Test Coverage History \u0026 Statistics\"\n[`undercover.el`]: https://github.com/sviridov/undercover.el\n \"undercover.el: A test coverage library for Emacs\"\n[MELPA]: https://melpa.org/#/cov \"cov @ MELPA\"\n\n\n# cov\n\n`cov` shows code coverage data for your program in emacs. Currently,\nit supports [`gcov`], [`lcov`], [`coverage.py`], and [`clover`]\noutput, as well as the [`Coveralls`] format produced by\n[`undercover.el`].\n\n![Screenshot](example.png)\n\n## Installation\n`cov` is on [MELPA]. To install it, type `M-x package-install RET cov RET`\n\n## Usage\nEnable `cov-mode` in a buffer. It will use the methods in\n`cov-coverage-file-paths` to look for a suitable coverage data file.\n`cov-mode` uses file watchers to automatically reload the coverage\nfile when it has been updated.\n\nLine coverage is displayed in the left fringe and added to the\n`help-echo` text property of the line.\n\n## Customization\n\n### Profiling mode\n\nBy default, `cov` will run in profiling mode. Lines which are executed\na lot will have the fringe decorated with `cov-heavy-face`, while\nlines executed less will have the fringe decorated with `cov-med-face`\nand `cov-light-face`. Lines not executed at all will be decorated with\n`cov-none-face`.\n\nUse the `cov-high-threshold` and `cov-med-threshold` variables to\ncustomize where the limits between haevy, medium, and light execution\nshould be.\n\n### Coverage mode\n\nSetting `cov-coverage-mode` to `t` *before enabling `cov-mode`* will\nrun cov in coverage mode. In this mode lines will be marked with\n`cov-coverage-run-face` or `cov-coverage-not-run-face` to executed and\nnon-executed lines respectively. Coverage mode should make finding\nuncovered lines slightly easier than profiling mode.\n\n\n### Finding The Coverage File\n\nCoverage files are located using the methods in\n`cov-coverage-file-paths`, a list of paths or functions that are tried\nin order to find a matching coverage file for the current buffer.\n\nPaths can be used for coverage files which have the same name as the\nsource file but with a suffix added, like `gcov`.  So far `gcov` is\nthe only supported tool that uses this scheme, but more can be added\nby appending to `cov-coverage-alist`.  `cov-coverage-alist` bind\npostfixes to the coverage tools:\n\n```lisp\n(setq cov-coverage-alist '((\".gcov\" . gcov)))\n```\nFor other tool or more complex environments it is also possible to provide a\nfunction instead of a path string. The function will be called with\nthe path and name of the buffer file and should return a cons cell of\nthe form `(COV-FILE-PATH . COVERAGE-TOOL)`. `PATH` shall be the full path\nand name of the coverage data file. `COVERAGE-TOOL` shall specify the\ncoverage tool.\n\n#### Finding gcov Files\n\n`gcov` files are located using `cov-coverage-file-paths` as described\nabove.\n\n#### Finding lcov Files\n\nAn `lcov` tracefile can contain data for multiple source files and can\nbe named anything. There are two ways to find tracefiles.\n\n1. Set `cov-lcov-file-name` to the absolute path of the tracefile.\n   This can be done with a directory- or file-local variable.\n\n2. Add pattarns or functions to `cov-lcov-patterns`.\n   Relative or absolute file patterns like \"../lcov.info\" will be\n   tested in order to find a matching file. Functions takes the dir\n   and name of the source file as arguments and should return an\n   absolute path.\n\n#### Finding coveralls Files\n\nCoveralls file are named `coverage-final.json` and are searched for in\neach directory from the source file to the root.\n\n#### Finding clover Files\n\nClover file are named `clover.xml` and are searched for in\neach directory from the source file to the root.\n\n#### Finding coverage.py Files\n\n`coverage.py` file are named `coverage.json` and are searched for in\neach directory from the source file to the root.\n\n## Develop\n\n`cov.el` can be extended to understand more coverage formats. To add\na new format:\n\n1. Add a function to `cov-coverage-file-paths` that locates a coverage\n   file for a given file. If a coverage file is found, it should\n   return a cons of the coverage file path and an identifier, like\n   `(cons filepath 'mytool)`. The original name of the file can be\n   found in the `cov-coverage-file` buffer local variable.\n2. Implement a `cov--mytool-parse`. The parse function is called with\n   a temp buffer with the coverage file data as `(current-buffer)` and\n   should parse the data and return the coverage as a alist of files\n   to coverage mapping. Coverage data is simply a list of two element\n   lists, where the first element is the line number and the second\n   the coverage count.\n\n### Test\nInstall dependencies:\n```bash\ncask install\n```\n\nRun tests:\n```bash\ncask exec ert-runner\n```\n\n## License\nGPLv3+\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamniederer%2Fcov","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamniederer%2Fcov","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamniederer%2Fcov/lists"}