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-diroption 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-csscontains the string/* Comment.Preproc */nopygmentsCSS is added anymore. (#786) - Add support for
DevcontainerandGitHub 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-decisionand option--fail-under-functionwhich 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-tracefileoption. (#805) - Add option
--jacocoto 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.ccomes afterfile_0.c). - Always sort at the end by filename if line or branch coverage is identical for a file.
- Add option
--sort-branchesto sort by branches instead of lines, this is the default if option--txt-branchesis used. - Add option
--sort-reverseto 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-errorsis used. (#852) - Use literal options for sorting and TXT metric. (#867)
- The option
-b, option--txt-branchesand option--branchesare deprecated, use option--txt-metricinstead.
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-uncoveredand option--sort-percentageare deprecated, use option--sortinstead.
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
mastertomain. (#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
-jis used. (#752) - Collapse also root directory if needed in nested HTML report. (#750)
- Handle special case of absolute source file paths in
gcovoutput. (#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-errorsto be able to ignore specific gcov errors. (#787) - Fix reading of choices options from configuration files (e.g.
gcov-ignore-parse-errors). (#816) - Fix
TypeErrorduring 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 applicationdocs (#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-summaryin addition to option--print-summary - Option
--json-add-tracefilein addition to option--add-tracefile - Option
--gcov-deletein addition to option--delete - Option
--gcov-keepin addition to option--keep - Option
--gcov-object-directoryin addition to option--object-directory - Option
--gcov-exclude-directoriesin addition to option--exclude-directories - Option
--gcov-use-existing-filesin 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
gccorclang. (#782) - Use
buildinstead of callingsetup.pydirectly. (#819) - Add nox session to import reference file from pipeline. (#831)
- Add support for
clang-15in our test suite and fix test with write protection under Mac OS. (#853) - Add test for parallel execution of multiple gcovr instances. (#832)