Releases: gcovr/gcovr
8.4
Breaking changes:
- Improve data model to have several coverage information per line. (#1069)
- Option
--merge-mode-conditionsis removed. - Property
function_namefor a line inJSONreport is now always set. JSONreport can now have several entries per line also with legacy text parser.- Cobertura and
HTMLreport now contain function coverage also for older GCC versions.
- Option
- 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-linkto link files inMarkdownreport. (#1079)
- Add option
- 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
Coverallsreport. (#1121) - Add support to define
--exclude-lines-by-patternand--exclude-branches-by-pattern
more than once. (#1129) - Add
--sonarqube-metricto define which metric is used as branch metric in report. (#1132) - Add
--sonarqube-prettyto pretty print the report. (#1136) - If the value for
-jis 0, the number of CPUs is used. If it is negative the it means "all but N CPUs". (#1148) - Add
--warn-excluded-lines-with-hitsto 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.
iftxt-metric="branch"is used in config file. (#1066) -
Add
excludedproperty for conditions and calls to theJSONreport. (#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
Coberturareport. (#1085) -
Fix
JaCoCoreport to follow the DTD. (#1089) -
Do not use option
--callsas 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-18andclang-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
gcovJSON 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-errorsand--gcov-ignore-parse-errors.
-
Fix wrong handling of functions with specialization. (#1126)
-
Fix errors in
Clover XMLreport. (#1138)- Remove optional attributes where information is not available:
loccontained the highest line number with coverage information instead of lines of the file.ncloccontained the number of reportable lines instead of the lines of the file without comments.
statementsandcoveredstatementscontain now the correct value instead of0.
- Remove optional attributes where information is not available:
-
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:
8.3
Known bugs:
Breaking changes:
- Replace setup.py with hatchling. To install from source at least version
21.3of 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
--includeto 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-thresholdto configure the value for detecting suspicious hits in GCOV files. (#1021) - Renamed JSON element
destination_blocknotodestination_block_id. (#1045) - Add
--html-block-idsto 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
TypeErrorexception 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
gcovJSON 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
JaCoCoreport. (#1022) - Fix path issue when reading/writing
Coverallsreport. (#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
blackandflake8withruffand move configuration ofpytesttopyproject.toml. (#1007) - Add
pylintfor 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
srcdirectory. (#1027) - The main routine doesn't call
sys.exiton 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
gcovJSON intermediate format:- The function return count is removed from internal data model, HTML and JSON output because missing in
gcovJSON intermediate format. (#935) - Renamed
namekey in in data model and JSON report todemangled_name. IfgcovJSON
intermediate format is used thenamekey will contained the mangled name. The keys are now
aligned with thegcovJSON 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
gcovlegacy 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
gcovoutput. (#903) - Add
--html-single-pageto create a single page report (static or with Javascript). (#916) - Upload standalone applications as release artifacts. (#941)
- Add support for
gcovJSON intermediate format. (#766) - Add
Exclusion markersto 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
banditto the linters. (#949) - Remove Codecov upload from pipeline. (#958)
- Add test with
bazeltests. (#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
--decisionsis 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-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)
6.0
Breaking changes:
- Remove not allowed attributes
function-rate,functions-coveredandfunctions-validfrom cobertura report. (#671) - Remove "noncode" entries in JSON reports. (#663)
- New option
--exclude-noncode-linesto exclude noncode lines. Noncode lines are not excluded by default anymore. (#704, #705) - Changed option
--gcov-ignore-parse-errorsto accept list of errors to ignore. (#701) - Handling of
gcoverrors: - The default filename for option
--coberturais 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-nestedfor 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-baseto define a base bath used in JSON reports. (#656) - New option
--callsto 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
--keepwhen 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-sizefeature. (#650) - Fix alphabetical sort of html report, for when there are symlinks. (#685)
- Handle option
--versionbefore 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
realpathforDirectoryPrefixFilterto support symlinks in root directory. (#712) - Fix deadlock if option
-jis used and there are errors fromgcovexecution. (#721) - Fix problem in decision parser if case is not on a single line with the break statement. (#738)
- Do not use
realpathforDirectoryPrefixFilterto support symlinks in root directory. (#712)
Documentation:
- Add detailed reference for the JSON output format. (#663)
Internal changes:
- Select the option
--html-themeusing CSS classes. (#650) - Change and extend
cmaketests. (#676) - Detect
gccversion for running tests. (#686) - Use scrubbed data for option
--update_referenceoption. (#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-14in our test suite and improve startup performance of docker image. (#731) - Change docker image to be able to use it like the
noxcommand 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
noxcommand 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-tracefilewill 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
.gcovparsing 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-virtualenvsand--no-installto call inside docker. (#616)