Releases: gcovr/gcovr
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
todestination_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
andflake8
withruff
and move configuration ofpytest
topyproject.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
Known bugs:
Breaking changes:
New features and notable changes:
Bug fixes and small improvements:
Documentation:
- Fix documentation build issue.
Internal changes:
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
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 todemangled_name
. Ifgcov
JSON
intermediate format is used thename
key will contained the mangled name. The keys are now
aligned with thegcov
JSON intermediate format. (#974)
- The function return count is removed from internal data model, HTML and JSON output because missing in
- 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
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
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:
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 */
nopygments
CSS is added anymore. (#786) - Add support for
Devcontainer
andGitHub 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 afterfile_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.
- Sort file names alpha numerical and with casefold (see
- 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 option
- The development branch is renamed from
master
tomain
. (#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-functions
when 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
- Option
- 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
orclang
. (#782) - Use
build
instead of callingsetup.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. (#8 8000 53) - Add test for parallel execution of multiple gcovr instances. (#832)
6.0
Breaking changes:
- Remove not allowed attributes
function-rate
,functions-covered
andfunctions-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: - 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
forDirectoryPrefixFilter
to support symlinks in root directory. (#712) - Fix deadlock if option
-j
is used and there are errors fromgcov
execution. (#721) - Fix problem in decision parser if case is not on a single line with the break statement. (#738)
- Do not use
realpath
forDirectoryPrefixFilter
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
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)
gcovr 5.1
This release bundles bugfixes and improvements from about 9 months of work.
- install/upgrade:
pip install -U gcovr
- full changelog and documentation: https://gcovr.com/en/5.1/changelog.html
Highlights include consistent support for symlinks including on Windows, and richer reports with function coverage and decision coverage.
Breaking changes:
- Dropped support for Python 3.6 (#550)
- Changed
xml
configuration key tocobertura
(#552) - JSON summary output: all percentages are now reported from 0 to 100 (#570)
New features and notable changes:
- Report function coverage (#362, #515, #554)
- Consistent support for symlinks across operating systems
- Show error message on STDERR when
--fail-under-line
or--fail-under-branch
fails (#502) - Can report decision coverage with
--decisions
option (reasonably formatted C/C++ source files only, HTML and JSON output) (#350) - Can create reproducible reports with the
--timestamp
option (#546) - Improvements to exclusion markers (LINE/START/STOP)
- Can use
--cobertura
as a less ambiguous alias for--xml
. (#552)
Bug fixes and small improvements:
- Gcov is invoked without localization by setting LC_ALL=C (#513)
- Gcov is invoked without temporary directories (#525)
- Gcov: solved problems with file name limitations. (#528)
- Fixed "root" path in JSON summary report. (#548)
- Correctly resolve relative filters in configuration files. (#568)
- HTML output: indicate lines with excluded coverage (#503)
- HTML output: fixed sanity check to support empty files (#571)
- HTML output: support
jinja2 >= 3.1
(#576)
Documentation:
Internal changes:
- Replaced own logger with Python's logging module. (#540)
- New parser for
.gcov
file format, should be more robust. (#512) - New tests
- Improvements to the test suite
- Use Nox instead of Makefiles to manage QA checks (#516, #555)
- Can run tests for all compiler versions in one go (#514)
- More linter checks (#566) and code style enforcement with black (#579)
- Better XML diffing with yaxmldiff (#495, #509)
- Share test reference data between compiler versions where possible (#556)
- Better environment variable handling (#493, #541)
- Fixed glob patterns for collecting reference files (#533)
- Add timeout for each single test. (#572)
- Improvements and fixes to the release process (#494, #537)
- Normalize shell scripts to Unix line endings (#538, #547)