{"id":13815149,"url":"https://github.com/gcovr/gcovr","last_synced_at":"2025-05-13T17:12:26.944Z","repository":{"id":8469534,"uuid":"10068798","full_name":"gcovr/gcovr","owner":"gcovr","description":"Generate code coverage reports with gcc/gcov","archived":false,"fork":false,"pushed_at":"2025-05-11T10:10:49.000Z","size":18203,"stargazers_count":920,"open_issues_count":15,"forks_count":283,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-05-11T11:21:15.511Z","etag":null,"topics":["c","clang","coverage","coverage-report","cpp","gcc","gcov","gcovr","lcov","python"],"latest_commit_sha":null,"homepage":"https://gcovr.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gcovr.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-05-15T01:45:20.000Z","updated_at":"2025-05-11T10:10:54.000Z","dependencies_parsed_at":"2023-02-19T02:15:28.126Z","dependency_job_id":"9522d7ec-6223-4f52-98f1-5667e0cd9443","html_url":"https://github.com/gcovr/gcovr","commit_stats":{"total_commits":1005,"total_committers":102,"mean_commits":9.852941176470589,"dds":0.7482587064676617,"last_synced_commit":"ce86eb56528d8c85f3231480256d13d0ffaf2a0c"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcovr%2Fgcovr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcovr%2Fgcovr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcovr%2Fgcovr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcovr%2Fgcovr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcovr","download_url":"https://codeload.github.com/gcovr/gcovr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253579909,"owners_count":21930838,"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":["c","clang","coverage","coverage-report","cpp","gcc","gcov","gcovr","lcov","python"],"created_at":"2024-08-04T04:03:02.117Z","updated_at":"2025-05-13T17:12:21.929Z","avatar_url":"https://github.com/gcovr.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"gcovr\n=====\n\ngenerate GCC code coverage reports\n\n`website and documentation \u003cwebsite_\u003e`__ • bugtracker_ • `GitHub \u003crepo_\u003e`__\n\n|GitHub-Actions-badge| |codacy-quality-badge| |codacy-coverage-badge| |pypi-badge| |Readthedocs-badge| |gitter-badge|\n\n.. begin abstract\n\nGcovr provides a utility for managing the use of the GNU gcov_ utility\nand generating summarized code coverage results. This command is\ninspired by the Python coverage.py_ package, which provides a similar\nutility for Python.\n\nThe ``gcovr`` command can produce different kinds of coverage reports:\n\n.. list-table::\n   :header-rows: 1\n\n   * - CLI Option\n     - User Guide\n     - Description\n\n   * - default, |abstract-option-txt|\n     - |abstract-guide-txt|\n     - compact human-readable summaries\n\n   * - |abstract-option-html|\n     - |abstract-guide-html|\n     - overview of all files\n\n   * - |abstract-option-html-details|\n     - |abstract-guide-html-details|\n     - annotated source files\n\n   * - |abstract-option-html-template-dir|\n     - |abstract-guide-html-template-dir|\n     - use custom set of Jinja2 templates\n\n   * - |abstract-option-csv|\n     - |abstract-guide-csv|\n     - CSV report summarizing the coverage of each file\n\n   * - |abstract-option-json|\n     - |abstract-guide-json|\n     - JSON report with source file structure and coverage\n\n   * - |abstract-option-json-summary|\n     - |abstract-guide-json-summary|\n     - JSON summary coverage report\n\n   * - |abstract-option-markdown|\n     - |abstract-guide-markdown|\n     - Markdown coverage report\n\n   * - |abstract-option-markdown-summary|\n     - |abstract-guide-markdown-summary|\n     - Markdown summary coverage report\n\n   * - |abstract-option-clover|\n     - |abstract-guide-clover|\n     - machine readable XML reports in Clover_ format\n\n   * - |abstract-option-cobertura|\n     - |abstract-guide-cobertura|\n     - machine readable XML reports in Cobertura_ format\n\n   * - |abstract-option-coveralls|\n     - |abstract-guide-coveralls|\n     - machine readable JSON report in Coveralls_ format\n\n   * - |abstract-option-jacoco|\n     - |abstract-guide-jacoco|\n     - machine readable XML reports in JaCoCo_ format\n\n   * - |abstract-option-lcov|\n     - |abstract-guide-lcov|\n     - machine readable report in LCOV_ info format\n\n   * - |abstract-option-sonarqube|\n     - |abstract-guide-sonarqube|\n     - machine readable XML reports in SonarQube_ format\n\n\nThus, gcovr can be viewed\nas a command-line alternative to the lcov_ utility, which runs gcov\nand generates an HTML-formatted report.\nThe development of gcovr was motivated by the need for\ntext summaries and XML reports.\n\n.. _gcov: https://gcc.gnu.org/onlinedocs/gcc/Gcov.html\n.. _coverage.py: https://coverage.readthedocs.io/\n.. _clover: https://bitbucket.org/atlassian/clover/src/master/\n.. _cobertura: https://github.com/cobertura/cobertura/\n.. _coveralls: https://coveralls.io/\n.. _jacoco: https://www.eclemma.org/jacoco/\n.. _lcov: https://github.com/linux-test-project/lcov\n.. _sonarqube: https://www.sonarsource.com/products/sonarqube/\n\n.. end abstract\n\n.. The above table contains links into the documentation.\n.. Here are the default targets that are used for rendering on GH or on PyPI.\n.. The targets for within the Sphinx docs are given in doc/source/index.rst\n\n.. |abstract-option-txt| replace:: ``--txt``\n.. |abstract-option-html| replace:: ``--html``\n.. |abstract-option-html-details| replace:: ``--html-details``\n.. |abstract-option-html-nested| replace:: ``--html-nested``\n.. |abstract-option-html-template-dir| replace:: ``--html-template-dir``\n.. |abstract-option-csv| replace:: ``--csv``\n.. |abstract-option-json| replace:: ``--json``\n.. |abstract-option-json-summary| replace:: ``--json-summary``\n.. |abstract-option-markdown| replace:: ``--markdown``\n.. |abstract-option-markdown-summary| replace:: ``--markdown-summary``\n\n.. |abstract-option-clover| replace:: ``--clover``\n.. |abstract-option-cobertura| replace:: ``--cobertura``\n.. |abstract-option-coveralls| replace:: ``--coveralls``\n.. |abstract-option-jacoco| replace:: ``--jacoco``\n.. |abstract-option-lcov| replace:: ``--lcov``\n.. |abstract-option-sonarqube| replace:: ``--sonarqube``\n\n.. |abstract-guide-txt| replace:: `Text Output \u003chttps://gcovr.com/en/stable/output/txt.html\u003e`__\n.. |abstract-guide-html| replace:: `HTML Output \u003chttps://gcovr.com/en/stable/output/html.html\u003e`__\n.. |abstract-guide-html-details| replace:: `HTML Output \u003chttps://gcovr.com/en/stable/output/html.html\u003e`__\n.. |abstract-guide-html-template-dir| replace:: `HTML Output \u003chttps://gcovr.com/en/stable/output/html.html\u003e`__\n.. |abstract-guide-csv| replace:: `CSV Output \u003chttps://gcovr.com/en/stable/output/csv.html\u003e`__\n.. |abstract-guide-json| replace:: `JSON Output \u003chttps://gcovr.com/en/stable/output/json.html\u003e`__\n.. |abstract-guide-json-summary| replace:: `JSON Output \u003chttps://gcovr.com/en/stable/output/json.html\u003e`__\n.. |abstract-guide-markdown| replace:: `Markdown Output \u003chttps://gcovr.com/en/stable/output/markdown.html\u003e`__\n.. |abstract-guide-markdown-summary| replace:: `Markdown Output \u003chttps://gcovr.com/en/stable/output/markdown.html\u003e`__\n\n.. |abstract-guide-clover| replace:: `Clover XML Output \u003chttps://gcovr.com/en/stable/output/clover.html\u003e`__\n.. |abstract-guide-cobertura| replace:: `Cobertura XML Output \u003chttps://gcovr.com/en/stable/output/cobertura.html\u003e`__\n.. |abstract-guide-coveralls| replace:: `Coveralls JSON Output \u003chttps://gcovr.com/en/stable/output/coveralls.html\u003e`__\n.. |abstract-guide-jacoco| replace:: `JaCoCo XML Output \u003chttps://gcovr.com/en/stable/output/jacoco.html\u003e`__\n.. |abstract-guide-lcov| replace:: `LCOV info Output \u003chttps://gcovr.com/en/stable/output/lcov.html\u003e`__\n.. |abstract-guide-sonarqube| replace:: `SonarQube XML Output \u003chttps://gcovr.com/en/stable/output/sonarqube.html\u003e`__\n\n\nExample HTML summary:\n\n.. image:: ./doc/images/screenshot-html.jpeg\n\nExample HTML details:\n\n.. image:: ./doc/images/screenshot-html-details.example.cpp.jpeg\n\n.. begin links\n\n.. _website:        https://gcovr.com/\n.. _documentation:  website_\n.. _repo:       https://github.com/gcovr/gcovr/\n.. _bugtracker: https://github.com/gcovr/gcovr/issues\n.. |GitHub-Actions-badge| image:: https://github.com/gcovr/gcovr/actions/workflows/CI.yml/badge.svg?event=push\n   :target: https://github.com/gcovr/gcovr/actions/workflows/CI.yml?query=branch%3Amain+event%3Apush\n   :alt: GitHub Actions build status\n.. |codacy-quality-badge| image:: https://app.codacy.com/project/badge/Grade/c50ef51a78024cf4a3025c464560a534\n   :target: https://app.codacy.com/gh/gcovr/gcovr/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade\n   :alt: Codacy quality status\n.. |codacy-coverage-badge| image:: https://app.codacy.com/project/badge/Coverage/c50ef51a78024cf4a3025c464560a534\n   :target: https://app.codacy.com/gh/gcovr/gcovr/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_coverage\n   :alt: Codacy coverage status\n.. |pypi-badge| image:: https://img.shields.io/pypi/v/gcovr.svg\n   :target: https://pypi.python.org/pypi/gcovr\n   :alt: install from PyPI\n.. |Readthedocs-badge| image:: https://readthedocs.org/projects/gcovr/badge/?version=latest\n   :target: https://gcovr.com/en/latest/?badge=latest\n   :alt: Documentation Status\n.. |gitter-badge| image:: https://badges.gitter.im/gcovr/gcovr.svg\n   :target: https://gitter.im/gcovr/gcovr\n   :alt: Gitter chat\n\n.. end links\n\nInstallation\n------------\n\n.. begin installation\n\nGcovr is available as a Python package that can be installed via pip_.\n\n.. _pip: https://pip.pypa.io/en/stable\n\nInstall newest stable ``gcovr`` release from PyPI:\n\n.. code:: bash\n\n    pip install gcovr\n\nInstall development version from GitHub (needs at least version `21.3` of pip):\n\n.. code:: bash\n\n    pip install git+https://github.com/gcovr/gcovr.git\n\n.. end installation\n\nQuickstart\n----------\n\n.. begin quickstart\n\nGCC can instrument the executables to emit coverage data.\nYou need to recompile your code with the following flags:\n\n::\n\n    --coverage -g -O0\n\nNext, run your test suite.\nThis will generate raw coverage files.\n\nFinally, invoke gcovr.\nThis will print a tabular report on the console.\n\n::\n\n    gcovr\n\nYou can also generate detailed or nested HTML reports:\n\n::\n\n    gcovr --html-details coverage.html\n    gcovr --html-nested coverage.html\n\nGcovr will create one HTML report per source file and for\n``--html-nested`` also per directory next to the coverage.html\nsummary.\n\nYou should run gcovr from the build directory.\nThe ``-r`` option should point to the root of your project.\nThis only matters if you have a separate build directory.\nFor example::\n\n    cd build; gcovr -r ..\n\n.. end quickstart\n\nFor complete documentation, read the `manual \u003cdocumentation_\u003e`__.\n\nContributing\n------------\n\nIf you want to report a bug or contribute to gcovr development,\nplease read our contributing guidelines first:\n`\u003chttps://gcovr.com/en/latest/contributing.html\u003e`_\n\nLicense\n-------\n\nThis software is distributed under the 3-clause BSD License.\nSee `\u003chttps://gcovr.com/en/latest/license.html#license-terms\u003e`_ for details.\nSee `\u003chttps://gcovr.com/en/latest/license.html#acknowledgements\u003e`_\nfor the full list of contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcovr%2Fgcovr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcovr%2Fgcovr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcovr%2Fgcovr/lists"}