Private API

This page lists non-exported (internal) symbols of CoveragePostprocessing.


From CoveragePostprocessing

_clean_stale_cov_files!

CoveragePostprocessing._clean_stale_cov_files!Function
_clean_stale_cov_files!(source_dirs)

Internal helper that removes stale .cov files from source_dirs.

If multiple runs are detected (PID suffix in filenames), this function keeps the PID with the largest number of .cov files and removes the others.

_collect_and_move_cov_files!

CoveragePostprocessing._collect_and_move_cov_files!Function
_collect_and_move_cov_files!(source_dirs, dest_dir) -> Vector{String}

Internal helper that moves all .cov files from source_dirs into dest_dir.

Returns a vector of destination paths for the moved files.

_count_cov_files

_generate_coverage_reports!

_reset_coverage_dir

CoveragePostprocessing._reset_coverage_dirFunction
_reset_coverage_dir(coverage_dir, cov_storage_dir)

Internal helper that recreates the coverage/ directory structure.

This function removes coverage_dir (recursively) if it already exists, then creates cov_storage_dir.

CTBase.postprocess_coverage

CTBase.postprocess_coverageMethod
CTBase.postprocess_coverage(::CTBase.CoveragePostprocessingTag; generate_report::Bool=true, root_dir::String=pwd())

Post-process coverage artifacts produced by Pkg.test(; coverage=true).

This implementation:

  • Collects coverage source directories under root_dir (src/, test/, ext/ when present)
  • Resets the coverage/ directory
  • Removes stale .cov files (keeping the most complete PID suffix when multiple runs exist)
  • Optionally generates reports (LCOV + markdown report)
  • Moves .cov files into coverage/cov/ (recursively from source dirs)

Keyword Arguments

  • generate_report::Bool=true: If true, write coverage/lcov.info and coverage/cov_report.md.
  • root_dir::String=pwd(): Root directory of the project.

Returns

  • Nothing

Notes

This function creates/removes/moves files and directories under root_dir.

Usage sketch (non-executed)

using CTBase

# CTBase.postprocess_coverage(; generate_report=true, root_dir=pwd())