Gcovr

Latest version: v7.2

Safety actively analyzes 630406 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

5.0

------------------

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. (:issue:`385`)
- Early fail when output cannot be created. (:issue:`382`)
- Add :option:`--txt` for text output. (:issue:`387`)
- Add :option:`--csv` for CSV output. (:issue:`376`)
- Add :option:`--exclude-lines-by-pattern` to filter out source lines by arbitrary
regex. (:issue:`356`)
- Add :option:`--json-summary` to generate a :ref:`JSON Summary <json_summary_output>` report. (:issue:`366`)
- Add :option:`--coveralls` to generate a :ref:`Coveralls <coveralls_output>` compatible JSON report. (:issue:`328`)
- Add support for output directories. If the output ends with a ``/`` or ``\`` it is used as a directory. (:issue:`416`)
- Compare paths case insensitive if file system of working directory is case insensitive. (:issue:`329`)
- Add wildcard pattern to json :option:`--add-tracefile`. (:issue:`351`)
- Enable :option:`--filter` and :option:`--exclude` for :ref:`Merging coverage <merging_coverage>`. (:issue:`373`)
- Only output 100.0% in text and HTML output if really 100.0%, else use 99.9%. (:issue:`389`)
- Support relative source location for shadow builds. (:issue:`410`)
- Incorrect path for header now can still generate html-details reports (:issue:`271`)
- Change format version in JSON output from number to string and update it to "0.2". (:issue:`418`, :issue:`463`)
- Only remove :option:`--root` path at the start of file paths. (:issue:`452`)
- Fix coverage report for cmake ninja builds with given in-source object-directory. (:issue:`453`)
- Add issue templates. (:issue:`461`)
- Add :option:`--exclude-function-lines` to exclude the line of the function definition in the coverage report. (:issue:`430`)
- Changes for HTML output format:

- Redesign HTML generation. Add :option:`--html-self-contained` to control external or internal CSS. (:issue:`367`)
- Change legend for threshold in html report. (:issue:`371`)
- Use HTML title also for report heading. Default value for :option:`--html-title` changed. (:issue:`378`)
- Add :option:`--html-tab-size` to configure tab size in HTML details. (:issue:`377`)
- Add option :option:`--html-css` for user defined styling. (:issue:`380`)
- Create details html filename independent from OS. (:issue:`375`)
- Add :option:`--html-theme` to change the color theme. (:issue:`393`)
- Add linkable lines in HTML details. (:issue:`401`)
- Add syntax highlighting in the details HTML report. This can be turned off with :option:`--no-html-details-syntax-highlighting <--html-details-syntax-highlighting>`. (:issue:`402`, :issue:`415`)

Documentation:

- Cookbook: :ref:`oos cmake` (:issue:`340`, :issue:`341`)

Internal changes:

- Add makefile + dockerfile for simpler testing.
- Add .gitbugtraq to link comments to issue tracker in GUIs. (:issue:`429`)
- Add GitHub actions to test PRs and master branch. (:issue:`404`)
- Remove Travis CI. (:issue:`419`)
- Remove Appveyor CI and upload coverage report from Windows and Ubuntu from the GitHub actions. (:issue:`455`)
- Add check if commit is mentioned in the CHANGELOG.rst. (:issue:`457`)
- Move flake8 config to setup.cfg and add black code formatter. (:issue:`444`)
- Fix filter/exclude relative path issue in Windows. (:issue:`320`, :issue:`479`)
- Extend test framework for CI:

- Set make variable TEST_OPTS as environment variable inside docker. (:issue:`372`)
- Add make variable USE_COVERAGE to extend flags for coverage report in GitHub actions. (:issue:`404`)
- Extend tests to use an unified diff in the assert. Add test options `--generate_reference`,
`--update_reference` and `--skip_clean`. (:issue:`379`)
- Support multiple output patterns in integration tests. (:issue:`383`)
- New option `--archive_differences` to save the different files as ZIP.
Use this ZIP as artifact in AppVeyor. (:issue:`392`)
- Add support for gcc-8 to test suite and docker tests. (:issue:`423`)
- Run as limited user inside docker container and add test with read only directory. (:issue:`445`)

4.2

---------------------

Breaking changes:

- Dropped support for Python 3.4.
- Format flag parameters like :option:`--xml` or :option:`--html`
now take an optional output file name.
This potentially changes the interpretation of search paths.
In ``gcovr --xml foo``,
previous gcovr versions would search the ``foo`` directory for coverage data.
Now, gcovr will try to write the Cobertura report to the ``foo`` file.
To keep the old meaning, separate positional arguments like
``gcovr --xml -- foo``.

Improvements and new features:

- :ref:`Configuration file <configuration>` support (experimental).
(:issue:`167`, :issue:`229`, :issue:`279`, :issue:`281`, :issue:`293`,
:issue:`300`, :issue:`304`)
- :ref:`JSON output <json_output>`. (:issue:`301`, :issue:`321`, :issue:`326`)
- :ref:`Merging coverage <merging_coverage>`
with :option:`gcovr --add-tracefile`.
(:issue:`10`, :issue:`326`)
- :ref:`SonarQube XML Output <sonarqube_xml_output>`. (:issue:`308`)
- Handle cyclic symlinks correctly during coverage data search.
(:issue:`284`)
- Simplification of :option:`--object-directory` heuristics.
(:issue:`18`, :issue:`273`, :issue:`280`)
- Exception-only code like a ``catch`` clause is now shown as uncovered.
(:issue:`283`)
- New :option:`--exclude-throw-branches` option
to exclude exception handler branches. (:issue:`283`)
- Support ``--root ..`` style invocation,
which might fix some CMake-related problems. (:issue:`294`)
- Fix wrong names in report
when source and build directories have similar names. (:issue:`299`)
- Stricter argument handling. (:issue:`267`)
- Reduce XML memory usage by moving to lxml.
(:issue:`1`, :issue:`118`, :issue:`307`)
- Can write :ref:`multiple reports <multiple output formats>` at the same time
by giving the output file name to the report format parameter.
Now, ``gcovr --html -o cov.html`` and ``gcovr --html cov.html``
are equivalent. (:issue:`291`)
- Override gcov locale properly. (:issue:`334`)
- Make gcov parser more robust when used with GCC 8. (:issue:`315`)

Known issues:

- The :option:`--keep` option only works when using existing gcov files
with :option:`-g`/:option:`--use-gcov-files`.
(:issue:`285`, :issue:`286`)
- Gcovr may get confused
when header files in different directories have the same name.
(:issue:`271`)
- Gcovr may not work when no en_US locale is available.
(:issue:`166`)

Documentation:

- :ref:`Exclusion marker <exclusion markers>` documentation.
- FAQ: :ref:`exception branches` (:issue:`283`)
- FAQ: :ref:`uncovered files not shown`
(:issue:`33`, :issue:`100`, :issue:`154`, :issue:`290`, :issue:`298`)

Internal changes:

- More tests. (:issue:`269`, :issue:`268`, :issue:`269`)
- Refactoring and removal of dead code. (:issue:`280`)
- New internal data model.

4.1

-----------------

- Fixed/improved --exclude-directories option. (:issue:`266`)
- New "Cookbook" section in the documentation. (:issue:`265`)

4.0

------------------

Breaking changes:

- This release drops support for Python 2.6. (:issue:`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.
(:issue:`148`, :issue:`156`, :issue:`256`)
- Filters now use forward slashes as path separators, even on Windows.
(:issue:`191`, :issue:`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. (:issue:`236`)
- Parse the GCC 8 gcov format. (:issue:`226`, :issue:`228`)
- New --source-encoding option, which fixes decoding under Python 3.
(:issue:`256`)
- New --gcov-ignore-parse-errors flag.
By default, gcovr will now abort upon parse errors. (:issue:`228`)
- Detect the error when gcov cannot create its output files (:issue:`243`,
:issue:`244`)
- Add -j flag to run gcov processes in parallel. (:issue:`3`, :issue:`36`,
:issue:`239`)
- The --html-details flag now implies --html. (:issue:`93`, :issue:`211`)
- The --html output can now be used without an --output filename
(:issue:`223`)
- The docs are now managed with Sphinx.
(:issue:`235`, :issue:`248`, :issue:`249`, :issue:`252`, :issue:`253`)
- New --html-title option to change the title of the HTML report.
(:issue:`261`, :issue:`263`)
- New options --html-medium-threshold and --html-high-threshold
to customize the color legend. (:issue:`261`, :issue:`264`)

Internal changes:

- Huge refactoring. (:issue:`214`, :issue:`215`, :issue:`221` :issue:`225`,
:issue:`228`, :issue:`237`, :issue:`246`)
- Various testing improvements. (:issue:`213`, :issue:`214`, :issue:`216`,
:issue:`217`, :issue:`218`, :issue:`222`, :issue:`223`, :issue:`224`,
:issue:`227`, :issue:`240`, :issue:`241`, :issue:`245`)
- HTML reports are now rendered with Jinja2 templates. (:issue:`234`)
- New contributing guide. (:issue:`253`)

3.4

----------------------

- Added --html-encoding command line option (:issue:`139`).
- Added --fail-under-line and --fail-under-branch options,
which will error under a given minimum coverage. (:issue:`173`, :issue:`116`)
- Better pathname resolution heuristics for --use-gcov-file. (:issue:`146`)
- The --root option defaults to current directory '.'.
- Improved reports for "(", ")", ";" lines.
- HTML reports show full timestamp, not just date. (:issue:`165`)
- HTML reports treat 0/0 coverage as NaN, not 100% or 0%. (:issue:`105`, :issue:`149`, :issue:`196`)
- Add support for coverage-04.dtd Cobertura XML format (:issue:`164`, :issue:`186`)
- Only Python 2.6+ is supported, with 2.7+ or 3.4+ recommended. (:issue:`195`)
- Added CI testing for Windows using Appveyor. (:issue:`189`, :issue:`200`)
- Reports use forward slashes in paths, even on Windows. (:issue:`200`)
- Fix to support filtering with absolute paths.
- Fix HTML generation with Python 3. (:issue:`168`, :issue:`182`, :issue:`163`)
- Fix --html-details under Windows. (:issue:`157`)
- Fix filters under Windows. (:issue:`158`)
- Fix verbose output when using existing gcov files (:issue:`143`, :issue:`144`)

3.3

-------------------

- Added CI testing using TravisCI
- Added more tests for out of source builds and other nested builds
- Avoid common file prefixes in HTML output (:issue:`103`)
- Added the --execlude-directories argument to exclude directories
from the search for symlinks (:issue:`87`)
- Added branches taken/not taken to HTML (:issue:`75`)
- Use --object-directory to scan for gcov data files (:issue:`72`)
- Improved logic for nested makefiles (:issue:`135`)
- Fixed unexpected semantics with --root argument (:issue:`108`)
- More careful checks for covered lines (:issue:`109`)

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.