Releases: gcovr/gcovr
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. (#853) - 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)
gcovr 5.0
This release bundles various improvements and new features over the last year.
- install/update: pip install -U gcovr
- full changelog and documentation: https://gcovr.com/en/5.0/changelog.html
Breaking changes:
- Dropped support for Python 2 and Python 3.5.
From now on, gcovr will only support Python versions
that enjoy upstream support.
Improvements and new features:
- Handles spaces in
gcov
path. (#385) - Early fail when output cannot be created. (#382)
- Add option
--txt
for text output. (#387) - Add option
--csv
for CSV output. (#376) - Add option
--exclude-lines-by-pattern
to filter out source lines by arbitrary regex. (#356) - Add
--json-summary
to generate aJSON Summary
report. (#366) - Add
--coveralls
to generate aCoveralls
compatible JSON report. (#328) - Add support for output directories. If the output ends with a
/
or\
it is used as a directory. (#416) - Compare paths case insensitive if file system of working directory is case insensitive. (#329)
- Add wildcard pattern to json
--add-tracefile
. (#351) - Enable
--filter
and--exclude
forCombining tracefiles
. (#373) - Only output 100.0% in text and HTML output if really 100.0%, else use 99.9%. (#389)
- Support relative source location for shadow builds. (#410)
- Incorrect path for header now can still generate html-details reports (#271)
- Change format version in JSON output from number to string and update it to "0.2". (#418, #463)
- Only remove
--root
path at the start of file paths. (#452) - Fix coverage report for cmake ninja builds with given in-source object-directory. (#453)
- Add issue templates. (#461)
- Add
--exclude-function-lines
to exclude the line of the function definition in the coverage report. (#430) - Changes for HTML output format:
- Redesign HTML generation. Add
--html-self-contained
to control externeal or internal CSS. (#367) - Change legend for threshold in html report. (#371)
- Use HTML title also for report heading. Default value for
--html-title
changed. (#378) - Add
--html-tab-size
to configure tab size in HTML details. (#377) - Add option
--html-css
for user defined styling. (#380) - Create details html filename independent from OS. (#375)
- Add
--html-theme
to change the color theme. (#393) - Add linkable lines in HTML details. (#401)
- Add syntax highlighting in the details HTML report. This can be turned off with
--no-html-details-syntax-highlighting
. (#402, #415)
- Redesign HTML generation. Add
Internal changes:
- Add makefile + dockerfile for simpler testing.
- Add .gitbugtraq to link comments to issue tracker in GUIs. (#429)
- Add GitHub actions to test PRs and master branch. (#404)
- Remove Travis CI. (#419)
- Remove Appveyor CI and upload coverage report from Windows and Ubuntu from the GitHub actions. (#455)
- Add check if commit is mentioned in the CHANGELOG.rst. (#457)
- Move flake8 config to setup.cfg and add black code formatter. (#444)
- Fix filter/exclude relative path issue in Windows. (#320, #479)
- Extend test framework for CI:
- Set make variable TEST_OPTS as environment variable inside docker. (#372)
- Add make variable USE_COVERAGE to extend flags for coverage report in GitHub actions. (#404)
- Extend tests to use an unified diff in the assert. Add test options
--generate_reference
,--update_reference
and--skip_clean
. (#379) - Support multiple output patterns in integration tests. (#383)
- New option
--archive_differences
to save the different files as ZIP. Use this ZIP as artifact in AppVeyor. (#392) - Add support for gcc-8 to test suite and docker tests. (#423)
- Run as limited user inside docker container and add test with read only directory. (#445)
gcovr 4.2
This release bundles various improvements and new features over the last year.
- install/update:
pip install -U gcovr
- full changelog and documentation: https://gcovr.com/en/4.2/changelog.html
- blog post: https://lukasatkinson.de/2019/gcovr-4.2/
Breaking changes:
- Dropped support for Python 3.4.
- Format flag parameters like
--xml
or--html
now take an optional output file name. This potentially changes the interpretation of search paths. Ingcovr --xml foo
, previous gcovr versions would search thefoo
directory for coverage data. Now, gcovr will try to write the Cobertura report to thefoo
file. To keep the old meaning, separate positional arguments likegcovr --xml -- foo
.
Improvements and new features:
- Configuration file support (experimental). (#167, #229, #279, #281, #293, #300, #304)
- JSON output. (#301, #321, #326)
- Combining tracefiles with
gcovr --add-tracefile
. (#10, #326) - SonarQube XML Output. (#308)
- Handle cyclic symlinks correctly during coverage data search. (#284)
- Simplification of
--object-directory
heuristics. (#18, #273, #280) - Exception-only code like a
catch
clause is now shown as uncovered. (#283) - New
--exclude-throw-branches
option
to exclude exception handler branches. (#283) - Support
--root ..
style invocation,
which might fix some CMake-related problems. (#294) - Fix wrong names in report
when source and build directories have similar names. (#299) - Stricter argument handling. (#267)
- Reduce XML memory usage by moving to lxml. (#1, #118, #307)
- Can write multiple reports at the same time by giving the output file name to the report format parameter. Now,
gcovr --html -o cov.html
andgcovr --html cov.html
are equivalent. (#291) - Override gcov locale properly. (#334)
- Make gcov parser more robust when used with GCC 8. (#315)
Known issues:
- The
--keep
option only works when using existing gcov files with-g
/--use-gcov-files
. (#285, #286) - Gcovr may get confused when header files in different directories have the same name. (#271)
- Gcovr may not work when no en_US locale is available. (#166)
Documentation:
- Exclusion marker documentation.
- FAQ: exception branches (#283)
- FAQ: uncovered files not shown (#33, #100, #154, #290, #298)
Internal changes:
- More tests. (#269, #268, #269)
- Refactoring and removal of dead code. (#280)
- New internal data model.
Warning: Python 2.7 will reach its end of life on Jan 1, 2020. With its first release on or after that date, gcovr will drop support for that version. Subsequently, gcovr will only support Python versions that enjoy upstream support.
Please note that gcovr does not use a strict SemVer version number. When support for a Python version is dropped, gcovr will not necessarily increment its major version.
gcovr 4.1
gcovr 4.0
This release represents a huge amount of refactoring and under-the-hood improvements. Most users should not experience any regressions, although there are lots of smaller incompatible changes.
Highlights:
⭐ Gcovr now runs perfectly on Python 3 (Python 3.5+ recommended).
⭐ Filters are no longer restricted on Windows. The filter syntax was changed to use forward slashes everywhere, so a filter like -f 'src/.*\.cpp'
will now behave identically on all platforms.
You can pip install gcovr
the most recent release from PyPI.
Breaking changes:
- This release drops support for Python 2.6. (#250)
- PIP is the only supported installation method.
- No longer encoding-agnostic under Python 2.7. If your source files do not use the system encoding (probably UTF-8), you will have to specify a --source-encoding. (#148, #156, #256)
- Filters now use forward slashes as path separators, even on Windows. (#191, #257)
- Filters are no longer normalized into pseudo-paths. This could change the interpretation of filters in some edge cases.
Improvements and new features:
- Improved --help output. (#236)
- Parse the GCC 8 gcov format. (#226, #228)
- New --source-encoding option, which fixes decoding under Python 3. (#256)
- New --gcov-ignore-parse-errors flag. By default, gcovr will now abort upon parse errors. (#228)
- Detect the error when gcov cannot create its output files (#243, #244)
- Add -j flag to run gcov processes in parallel. (#3, #36, #239)
- The --html-details flag now implies --html. (#93, #211)
- The --html output can now be used without an --output filename (#223)
- The docs are now managed with Sphinx. (#235, #248, #249, #252, #253)
- New --html-title option to change the title of the HTML report. (#261, #263)
- New options --html-medium-threshold and --html-high-threshold to customize the color legend. (#261, #264)
Internal changes: