4.2
版本发布时间: 2019-11-06 23:45:48
gcovr/gcovr最新发布版本:7.2(2024-02-26 04:22:56)
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.