Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: gcovr/gcovr

8.4

27 Sep 22:15
87771a8

Choose a tag to compare

Breaking changes:

  • Improve data model to have several coverage information per line. (#1069)
    • Option --merge-mode-conditions is removed.
    • Property function_name for a line in JSON report is now always set.
    • JSON report can now have several entries per line also with legacy text parser.
    • Cobertura and HTML report now contain function coverage also for older GCC versions.
  • Add excluded metrics to HTML report. The total numbers in the report contain now also
    the excluded elements. (#1153)

New features and notable changes:

  • Add support for Markdown output format. (#1072)
  • Add filename and line number in warning logs. (#1075)
    • Add option --markdown-file-link to link files in Markdown report. (#1079)
  • Abort on version mismatch between gcc/gcov instead of trying all working directories. (#1097)
  • Clean up temporary files generated by gcov tool when exception occurs. (#1106, #1134)
  • Add branch information to Coveralls report. (#1121)
  • Add support to define --exclude-lines-by-pattern and --exclude-branches-by-pattern
    more than once. (#1129)
  • Add --sonarqube-metric to define which metric is used as branch metric in report. (#1132)
  • Add --sonarqube-pretty to pretty print the report. (#1136)
  • If the value for -j is 0, the number of CPUs is used. If it is negative the it means "all but N CPUs". (#1148)
  • Add --warn-excluded-lines-with-hits to print a warning if a line which is excluded by comments has a hit counter != 0. (#1151)
  • Add comment to exclude branches without hit in addition to exclude all. (#1152)

Bug fixes and small improvements:

  • Fix warning Deprecated config key None used, please use 'txt-metric=branch' instead.
    if txt-metric="branch" is used in config file. (#1066)

  • Add excluded property for conditions and calls to the JSON report. (#1080)

  • Remove the fixed width of the HTML details which leads to text overflows. (#1086)

  • Fix duplicate constructors, destructors and wrong const overload functions in Cobertura report. (#1085)

  • Fix JaCoCo report to follow the DTD. (#1089)

  • Do not use option --calls as exclusion filter. (#1090)

  • Add support for reading gcov JSON data without source files. (#1094)

  • Add back references to the data model to get source location in error messages. (#1094)

  • Fix deprecation warning in standalone application. (#1115)

  • Improvements of development environment (#1118):

    • Add optional dependencies for development.
    • Add pre-commit hook to ensure quality checks.
    • All line endings, except for the git internal files, are preserved.
  • Update the reference data to the newest pygments version and extend the tests with clang-17,
    clang-18 and clang-19. (#1120)

  • Fix error when merging conditions (and branches) for the same line if they are reported different
    across GCOV data files. (#1092)

  • Improve branch details view if there are branches for several functions on same line. (#1128)

  • Do not add files without functions and lines from gcov JSON files to data model. (#1130)

  • Improve error message if regex pattern is wrong. (#1135)

    • The error message now contains the option name.
    • Align option names if it can be used multiple times. The key used for storing the option is always
      written in singular and the option always has a singular version, except the options
      --gcov-ignore-errors and --gcov-ignore-parse-errors.
  • Fix wrong handling of functions with specialization. (#1126)

  • Fix errors in Clover XML report. (#1138)

    • Remove optional attributes where information is not available:
      • loc contained the highest line number with coverage information instead of lines of the file.
      • ncloc contained the number of reportable lines instead of the lines of the file without comments.
    • statements and coveredstatements contain now the correct value instead of 0.
  • Add highlighting for exclusion markers in HTML report file details. (#1154)

  • Make <title> of HTML reports more informative. The title of a file's source listing page now includes the file path. (#1155)

Documentation:

  • Fix formatting of verbatim text included from external files. (#1093)

Internal changes:

  • Refactor internal data model:
    • Add merge functionality to coverage objects instead of an own file. (#1067)
    • Move data serialization and deserialization from JSON report to coverage classes. (#1078)
  • Update Windows runner to windows-2022 and windows-2025. (#1108)
  • Add trusted publishing. (#1114)
  • Restructure the line coverage data model and change the sort order in the reports. (#1137)
  • Improve creation of docker image and fix build warnings. (#1139)

8.3

19 Jan 22:24

Choose a tag to compare

8.3

Known bugs:

Breaking changes:

  • Replace setup.py with hatchling. To install from source at least version 21.3 of pip is needed. (#1026)
  • Drop support for Python 3.8. (#1030)

New features and notable changes:

  • Add condition coverage to text summary report. (#985)
  • Add --include to search files in search paths which should be added to report. (#998, #1044)
  • Add option to generate LCOV format produced by version 1.x of LCOV tool. (#1001)
  • Extend logging for data merge errors with info about the data sources. (#1010)
  • Add condition coverage merge mode option --merge-mode-conditions (#1009)
  • Add --gcov-suspicious-hits-threshold to configure the value for detecting suspicious hits in GCOV files. (#1021)
  • Renamed JSON element destination_blockno to destination_block_id. (#1045)
  • Add --html-block-ids to show the block ids of the lines and branches in HTML report. (#1055)

Bug fixes and small improvements:

  • Fixed an error handling bug throwing a TypeError exception on a gcov merge assertion failure
    instead of reporting the error and (if requested by the user) continuing execution. (#997)
  • Check format version of external generated gcov JSON files. (#999)
  • Fix crash on Windows when trying to fix the case of the files. (#1000)
  • Fix LCOV report. Excluded lines where added with a count of 0. (#1012)
  • Fix line exclusion not clearing all child coverage data. (#1018)
  • Fix summary stats in JaCoCo report. (#1022)
  • Fix path issue when reading/writing Coveralls report. (#1037)
  • Fix issue with negative counters in GCOV JSON export. (#1048)

Documentation:

  • Update documentation for developing with Docker. (#1013)

Internal changes:

  • Add MacOs 15 and clang-16 to the GitHub test workflow. (#1004)
  • Fix sporadic timestamp mismatch in development build package. (#1006)
  • Replace black and flake8 with ruff and move configuration of pytest to pyproject.toml. (#1007)
  • Add pylint for testing code. (#1014)
  • Align variable names across the files. (#1015)
  • Rework exclusion handling to keep information about excluded coverage. (#1016)
  • Add mypy (using strict configuration) for testing code. (#1019, #1028, #1029)
  • Add a container class for the coverage data. (#1023)
  • Replace setup.py with hatchling. (#1026)
  • Move gcovr to src directory. (#1027)
  • The main routine doesn't call sys.exit on it's own, we always return the exit code. (#1029)

8.2

13 Oct 08:15

Choose a tag to compare

8.2

Known bugs:

Breaking changes:

New features and notable changes:

Bug fixes and small improvements:

Documentation:

  • Fix documentation build issue.

Internal changes:

8.1

12 Oct 23:23
0e16099

Choose a tag to compare

8.1

Known bugs:

Breaking changes:

New features and notable changes:

  • If a internal generated function is excluded the lines, if present, are excluded as well. (#991)

Bug fixes and small improvements:

  • Fix exclusion of internal functions. (#987)
  • Only print info on the first undefined block number in data model. (#990)

Documentation:

Internal changes:

8.0

08 Oct 06:05
029de70

Choose a tag to compare

8.0

Known bugs:

Breaking changes:

  • Changes related to added support of gcov JSON intermediate format:
    • The function return count is removed from internal data model, HTML and JSON output because missing in
      gcov JSON intermediate format. (#935)
    • Renamed name key in in data model and JSON report to demangled_name. If gcov JSON
      intermediate format is used the name key will contained the mangled name. The keys are now
      aligned with the gcov JSON intermediate format. (#974)
  • If block information is missing in gcov legacy text format block 0 is assumed. (#976)

New features and notable changes:

  • In Azure pipelines or GitHub actions errors and warnings are printed in an additional format captured by the CI. (#904)
  • Detect suspicious counter values in gcov output. (#903)
  • Add --html-single-page to create a single page report (static or with Javascript). (#916)
  • Upload standalone applications as release artifacts. (#941)
  • Add support for gcov JSON intermediate format. (#766)
    • Add function, block and condition information to data model. (#954, #960, #964, #979)
    • Add function function coverage to coveralls and HTML report. (#975)
  • Add Exclusion markers to exclude a while function. (#955)
  • Change sort order in JSON output files. (#959)
  • Add source exclusion markers to exclude source branch from target line. (#961)

Bug fixes and small improvements:

  • Implement consistent sorting of files with no lines, or one line with zero coverage (#918)
  • Use replacement value of 0 for function call count NAN %. (#910)
  • Fix erroneous deprecation warning. (#912)
  • Fix display filename in HTML report. (#920)
  • Fix bundle of standalone executable with Python 3.12. (#924)
  • Fix merging of function coverage data. (#925)
  • Fix inefficient regular expression. (#933)
  • Fix missing output of gcov if execution fails. (#956)

Documentation:

  • Update Sphinx config because of deprecated context injection from Read The Docs. (#936)

Internal changes:

  • Move tests to directory in the root. (#897)
  • Add MacOs to the GitHub test workflow. (#901, #905, #980)
  • Remove test exclusions for MacOs and adapt tests and reference data. (#902)
  • Link correct documentation version in copyright header. (#907)
  • Move tag creation before publish the distribution because tag from pipeline doesn't trigger additional runs. (#899)
  • Fix scrubber for date in HTML test data. (#919)
  • Add test with Python 3.12. (#924)
  • Add gcc-14 to the test suite. (#923)
  • Skip coverage upload if executed in a fork. (#930)
  • Only execute pipeline if pushed on main and add button to execute workflow manual. (#930)
  • Check spelling in test pipeline. (#932)
  • Merge the test and deploy workflow to a single CI workflow. (#946, #947)
  • Add Codacy to CI workflow for tracking coverage and code quality. (#948)
  • Add bandit to the linters. (#949)
  • Remove Codecov upload from pipeline. (#958)
  • Add test with bazel tests. (#969)

7.2

25 Feb 20:22
c4b74b0

Choose a tag to compare

7.2

Fix tagging issue of 7.1, no functional change.

7.1

25 Feb 19:49
9735d47

Choose a tag to compare

7.1

New features and notable changes:

  • Add support for coloured logging. (#887)
  • Add support for TOML configuration format. (#881)
  • Add support for Clover XML output format. (#888)
  • Add decision to JSON summary report if option --decisions is used. (#892)

Bug fixes and small improvements:

  • Add support for files with more than 9999 lines. (#883, fixes #882)
  • Do not suppress gcov errors if exception occur. (#889)

Documentation:

  • Add nox session to generate the screenshots from the HTML files. (#877)

Internal changes:

  • Improve Dockerfile for faster rebuilds by using cache. (#878)
  • Fix deprecation warnings from GitHub actions. (#880)
  • Add pipeline job to apply tag if new version is bumped. (#879)
  • Improve test coverage and generate coverage report if executed in local environment. (#891)

7.0

25 Jan 21:52
fc190bc

Choose a tag to compare

7.0

Breaking changes:

  • Dropped support for Python 3.7 (#869)
  • The exit code for an error of the reader module is changed from 8 to 64 and for a writer from 7 to 128. (#773)

New features and notable changes:

  • Add --html-template-dir option to use custom Jinja2 templates (#758)
  • Add block numbers and md5 sums of code lines to data model. (#764)
  • If the CSS given with option --html-css contains the string /* Comment.Preproc */ no pygments CSS is added anymore. (#786)
  • Add support for Devcontainer and GitHub Codespaces. (#771)
  • Fix Dockerfile.qa to avoid uid conflicts. (#801)
  • Pygments required ≥ 2.13.0. (#799)
  • Add a second theme for HTML report inspired by GitHub. (#793)
  • Add option --fail-under-decision and option --fail-under-function which will error under a given minimum coverage. (#773)
  • Add function coverage to data model. (#822)
  • Add support for importing Cobertura XML files with --cobertura-add-tracefile option. (#805)
  • Add option --jacoco to generate JaCoCo XML format. (#823))
  • Add function coverage to HTML report. (#828)
  • Improve sorting of data in reports (#817):
    • Sort file names alpha numerical and with casefold (see str.casefold <https://docs.python.org/3.11/library/stdtypes.html?highlight=str%20casefold#str.casefold>_) (file_10.c comes after file_0.c).
    • Always sort at the end by filename if line or branch coverage is identical for a file.
    • Add option --sort-branches to sort by branches instead of lines, this is the default if option --txt-branches is used.
    • Add option --sort-reverse to reverse the sort order.
  • Add option to report covered lines in txt report. (#836)
  • Add support for specifying files for option search_paths. (#834)
  • Use different color for partial covered lines in HTML report. (#839)
  • Add support to generate LCOV info files. (#830)
  • Add support for FIPS enabled OS when used with Python 3.9. (#850)
  • Reduce file size for detailed HTML reports by merging columns the function lists. (#840)
  • Ignore all negative hits if option --gcov-ignore-parse-errors is used. (#852)
  • Use literal options for sorting and TXT metric. (#867)
    • The option -b, option --txt-branches and option --branches are deprecated, use option --txt-metric instead.
      The reason for this is that we have line, branch and decision coverage and handle this with flags is more complex than
      using an enumeration.
    • The option --sort-uncovered and option --sort-percentage are deprecated, use option --sort instead.
      The reason for this is that only one sorting order shall be selectable and and an enumeration is easier to handle
      than several flags.
  • The development branch is renamed from master to main. (#829, #873)
  • Add support for decision coverage metric in text report (#864)
  • Split list of functions into tables with maximum 10000 rows to fix rendering issues. (#858)

Bug fixes and small improvements:

  • Print calls and decision statistics in summary only if values are gathered. (#749)
  • Log the thread name if option -j is used. (#752)
  • Collapse also root directory if needed in nested HTML report. (#750)
  • Handle special case of absolute source file paths in gcov output. (#776)
  • Ignore exit code 6 when running gcov (output write error introduced gcc-12). (#781)
  • Change coveralls value from 0.0 to 1.0 if no code lines or branches are present. (#796)
  • Fix symlinked root directories on Windows. (#814)
  • Extend option --gcov-ignore-errors to be able to ignore specific gcov errors. (#787)
  • Fix reading of choices options from configuration files (e.g. gcov-ignore-parse-errors). (#816)
  • Fix TypeError during decision analysis. (#784)
  • Use relative paths if possible when running gcov. (#820)
  • Respect :option--merge-mode-functionswhen merging coverage data. (#844)

Documentation:

  • Fix wrong command in How to create a standalone application docs (#792)
  • Update output html to add github style themes (#818)

Internal changes:

  • Do not scrub versions in reference data. (#747)
  • Add interface for the different formats to easily add new formats. (#755)
  • All options have now a prefix of the format and all long option names can be used in a configuration file. (#755)
    • Option --txt-summary in addition to option --print-summary
    • Option --json-add-tracefile in addition to option --add-tracefile
    • Option --gcov-delete in addition to option --delete
    • Option --gcov-keep in addition to option --keep
    • Option --gcov-object-directory in addition to option --object-directory
    • Option --gcov-exclude-directories in addition to option --exclude-directories
    • Option --gcov-use-existing-files in addition to option --use-gcov-files
  • Use interactive terminal for docker (support of Ctrl-C to interrupt). (#767)
  • Use separate session for flake8 and us this session in lint. (#768)
  • Replace the deprecated codecov python uploader with the binary uploader. (#770)
  • Add gcc-12 and gcc-13 to the test suite. (#780)
  • Add sessions to run the targets for all versions of gcc or clang. (#782)
  • Use build instead of calling setup.py directly. (#819)
  • Add nox session to import reference file from pipeline. (#831)
  • Add support for clang-15 in our test suite and fix test with write protection under Mac OS. (#853)
  • Add test for parallel execution of multiple gcovr instances. (#832)

6.0

08 Mar 23:02
1221ef6

Choose a tag to compare

6.0

Breaking changes:

  • Remove not allowed attributes function-rate, functions-covered and functions-valid from cobertura report. (#671)
  • Remove "noncode" entries in JSON reports. (#663)
  • New option --exclude-noncode-lines to exclude noncode lines. Noncode lines are not excluded by default anymore. (#704, #705)
  • Changed option --gcov-ignore-parse-errors to accept list of errors to ignore. (#701)
  • Handling of gcov errors:
    • Do not ignore return code of gcov. (#653)
    • New option --gcov-ignore-errors to ignore gcov errors. Old behavior was to print a warning and continue. (#718)
  • The default filename for option --cobertura is changed from coverage.xml to cobertura.xml (#721)
  • Revert changes from #623 and add documentation entry Support of Keil uVision format. (#727)

New features and notable changes:

  • New option --html-nested for reports that summarize subdirectories with aggregated statistics per directory. (#687)
  • Accept NAN % which is used in GCOV 7.5.0 instead of an invalid value. (#651)
  • New option --json-base to define a base bath used in JSON reports. (#656)
  • New option --calls to report call coverage: function calls invoked/total (#666)
  • New nox session to generate a portable application with pyinstaller. (#661)
  • Print a warning if root directory contains symlinks. (#652)
  • Change option --keep when calling gcov internaly. (#703)
  • Allow annotations for never executed branches. (#711)
  • Add function merge mode for same function defined in different lines. (#700)
  • Update link to gcovr documentation in HTML report to point to the documentation of the used version. (#723)
  • Add environment SOURCE_DATE_EPOCH to set default for option --timestamp. (#729)

Bug fixes and small improvements:

  • Fix option --html-tab-size feature. (#650)
  • Fix alphabetical sort of html report, for when there are symlinks. (#685)
  • Handle option --version before parsing the configuration file. (#696)
  • Fix reports of excluded coverage. (#409, #503, #663)
  • Fix handling for nonexistent source code for HTML-details and Coveralls reports. (#663)
  • Exclude functions with Exclusion markers. (#713)
  • Fix problem in decision parser if open block brace is on same line. (#681)
  • Add Python 3.11 to test matrix. (#717)
  • Fix casing of files if filesystem is case insensitive. (#694)
  • Do not use realpath for DirectoryPrefixFilter to support symlinks in root directory. (#712)
  • Fix deadlock if option -j is used and there are errors from gcov execution. (#721)
  • Fix problem in decision parser if case is not on a single line with the break statement. (#738)
  • Do not use realpath for DirectoryPrefixFilter to support symlinks in root directory. (#712)

Documentation:

  • Add detailed reference for the JSON output format. (#663)

Internal changes:

  • Select the option --html-theme using CSS classes. (#650)
  • Change and extend cmake tests. (#676)
  • Detect gcc version for running tests. (#686)
  • Use scrubbed data for option --update_reference option. (#698)
  • Install ninja with package manager instead of GitHub action. (#699)
  • Rename the reference files coverage.xml to cobertura.xml and the test from xml to cobertura. (#719)
  • Add support for clang-14 in our test suite and improve startup performance of docker image. (#731)
  • Change docker image to be able to use it like the nox command itself. (#734)
  • Split HTML templates into one file for each part of the page. (#735)
  • Change docker image to be able to use it like the nox command itself. (#734)

gcovr 5.2

06 Aug 20:29
1040a85

Choose a tag to compare

This release bundles bugfixes and small improvements.

New features and notable changes:

  • Log additional info on gcov parsing errors (#589)
  • Add support for branch exclude markers. (#^644)
  • Additional options to configure the thresholds for lines and branches in HTML separate. (#645)

Bug fixes and small improvements:

  • Remove function coverage from sonarcube report (#591)
  • Fix parallel processing of gcov data (#592)
  • Better diagnostics when dealing with corrupted input files (#593)
  • Accept metadata lines without values (introduced in gcc-11). (#601)
  • Properly close element in detailed HTML report. (#602)
  • Use sign instead of >= in HTML legend. (#603)
  • Using --add-tracefile will now correctly merge branch coverage. (#600)
  • Fix package-level function coverage statistics in Cobertura XML reports. (#605)
  • Respect excluded/noncode lines for aggregated branchcoverage. (#611)
  • Fix list options in configuration file (search-path). (#612)
  • Fix assert and key error in --decisions flag. (#642)
  • Fix adding none existing lines by decision analysis to data model. (#617)
  • Always treat relative paths in config files as relative to the directory of the file. (#615)
  • More flexible .gcov parsing to support files generated by third party tools.
    (#621, #623)

Internal changes:

  • Fix black check to fail on format errors (#594)
  • Change session black with no arguments to format all files (#595)
  • Add gcc-10 and gcc-11 to the test suite. (#597)
  • Improved internal coverage data model to simplify processing. (#600)
  • Use pretty print for cobertura and coveralls in test suite. (#606)
  • Forward nox options --reuse-existing-virtualenvs and --no-install to call inside docker. (#616)