Represents coverage info about a file, including the filename, the source code itself, and a Vector of run counts for each line. If the line was expected to be run the count will be an Int >= 0. Other lines such as comments will have a count of nothing.

amend_coverage_from_src!(coverage::Vector{CovCount}, srcname)

The code coverage functionality in Julia only reports lines that have been compiled. Unused functions (or discarded lines) therefore may be incorrectly recorded as nothing but should instead be 0. This function takes an existing result and updates the coverage vector in-place to mark source lines that may be inside a function.


Cleans up all .cov files associated with a given source file. This only looks in the directory of the given file, i.e. the .cov files should be siblings of the source file.


Cleans up all the .cov files in the given directory and subdirectories. Unlike process_folder this does not include a default value for the root folder, requiring the calling code to be more explicit about which files will be deleted.


Summarize results from a single FileCoverage instance or a Vector of them, returning a 2-tuple with the covered lines and total lines.

merge_coverage_counts(a1::Vector{CovCount}, a2::Vector{CovCount}) -> Vector{CovCount}

Given two vectors of line coverage counts, sum together the results, preseving null counts if both are null.

merge_coverage_counts(as::Vector{CovCount}...) -> Vector{CovCount}

Given vectors of line coverage counts, sum together the results, preseving null counts if both are null.

process_cov(filename, folder) -> Vector{CovCount}

Given a filename for a Julia source file, produce an array of line coverage counts by reading in all matching .{pid}.cov files.

process_file(filename[, folder]) -> FileCoverage

Given a .jl file and its containing folder, produce a corresponding FileCoverage instance from the source and matching coverage files. If the folder is not given it is extracted from the filename.

process_folder(folder="src") -> Vector{FileCoverage}

Process the contents of a folder of Julia source code to collect coverage statistics for all the files contained within. Will recursively traverse child folders. Default folder is "src", which is useful for the primary case where CoverageCore is called from the root directory of a package.

analyze_malloc_files(files) -> Vector{MallocInfo}

Iterates through the given list of filenames and return a Vector of MallocInfos with allocation information.