Fastcov

Latest version: v1.15

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

Scan your dependencies

Page 1 of 3

1.15

Minor bug fixes

- Handle a few more edge cases like negative line counts
- Added ability to strip source file paths prior to opening them

1.14

Minor. bug fixes

- Update to use longform flags when invoking gcov: this is to avoid problems with the `--json-format` shortform option. Starting with GCC11, `-i` is deprecated in favor of `-j`, so using longform avoids future option compatibility issues
- Fix issue where passing `--zerocounters` and `--process-gcno` simultaneously resulted in deletion of the gcno files

1.13

Misc. bug fixes and performance improvements

- Skip v1.12 because tag already exists and Travis CI/CD won't re-trigger a tag that has triggered it
- Made exclusion marker scanning much more efficient:
- fastcov will do a preliminary scan to see if even a single marker is in the file before processing it; otherwise it early exits
- fastcov now spawns multiple processes to scan for exclusion markers instead of multiple threads
- This should result in significant speed gains if a) you have a lot of cores, b) you have a lot of source files
- Otherwise you probably won't notice
- Fixed issue where fastcov sometimes crashes if gcov is fed an empty gcno/gcda file
- Fastcov no longer crashes and will instead skip those source files, print an error, and exit with status code 8

1.11

- Fixed an issue where gcov crashing or being killed causes fastcov to hang forever blocking on a queue

1.10

Note that v1.9 was skipped because the PyPI uploaded package was incorrect. This release adds a few utilities that are complementary to fastcov. They are located in the `utils/` directory, and like fastcov, are single source python scripts that can be copied from this repository and runned directly. Alternatively, installing the latest version of fastcov using pip will also install these utilities. Here is a brief description of what each utility does:

- utils/fastcov_summary.py

This utility will summarize a provided fastcov JSON file similar to the way [genhtml](https://linux.die.net/man/1/genhtml) summarizes a given lcov info file. Additionally, flags can be passed that check if a certain coverage threshold is met for function, line, or branch coverage.

This script is useful for 2 purposes. It can be used to print out a coverage summary on the command line for a CI system to parse using regex (such as GitLab CI, for example). This script can also be used to fail builds if (for example) line coverage drops below a certain percentage.

- utils/fastcov_to_sonarqube.py

This script will convert a provided fastcov JSON file to the Sonar [generic test coverage](https://docs.sonarqube.org/latest/analysis/generic-test/) XML format.

1.8

Misc. bug fixes and features, special thanks to rburtnykx

Description:
- Fixed stdout redirection issue (sys.stdout.encoding is None)
- Fastcov now uses compile base directory from gcov json by default
- `--dump-statistic` can now be used to dump coverage statistics of the processed file(s)
- `--validate-sources` can now be used to assert all source files exist
- `--diff-filter` and `--diff-base-dir` can be used to apply a unified diff file to a coverage report
- Default output file name uses `.info` if `--lcov` is passed, `.json` otherwise.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.