trial.coverage

A module containing the logic for parsing and analysing the code coverage

Members

Functions

codeLines
auto codeLines(LineCoverage[] lines)

Cont how many lines were hit

convertLstFiles
double convertLstFiles(string source, string destination, string packagePath, string packageName)

Converts coverage lst files to html

coverageHeader
string coverageHeader(CoveredFile coveredFile)

Generate the coverage page header

coveragePercent
double coveragePercent(CoveredFile[] coveredFiles)

Calculate the coverage percent from the current project

coverageShield
string coverageShield(string percent)

Create line coverage shield as svg

getCoveragePercent
double getCoveragePercent(string fileContent)

Get the percentage from the covered summary

getCoverageSummary
auto getCoverageSummary(string fileContent)

Get the line that contains the coverage summary

getFileName
string getFileName(string fileContent)

Get the filename from the coverage summary

hitLines
auto hitLines(LineCoverage[] lines)

Cont how many lines were hit

htmlProgress
string htmlProgress(string percent)

Create an html progress bar

ignoredTable
string ignoredTable(string content)
Undocumented in source. Be warned that the author may not have intended to support it.
indexHeader
string indexHeader(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
indexTable
string indexTable(string content)
Undocumented in source. Be warned that the author may not have intended to support it.
isIgnored
bool isIgnored(string content)

Check if a file should be ignored from the report

isPackagePath
bool isPackagePath(string fullPath, string packagePath)

Check if a file is in the current path

replaceVariable
string replaceVariable(string page, string key, string value)

Replace an {variable} inside a string

toCoverageFile
CoveredFile toCoverageFile(string content, string packagePath)

Converts a .lst file content to a CoveredFile structure

toCoverageHtmlFileName
string toCoverageHtmlFileName(string fileName)
Undocumented in source. Be warned that the author may not have intended to support it.
toCoverageLines
auto toCoverageLines(string fileContent)

Parse the file lines

toHtml
string toHtml(CoveredFile coveredFile)

Convert a CoveredFile struct to html

toHtmlCoverage
string toHtmlCoverage(LineCoverage[] lines)

Get the line coverage column for the html report

toHtmlIndex
string toHtmlIndex(CoveredFile[] coveredFiles, string name)
Undocumented in source. Be warned that the author may not have intended to support it.
toLineCoverage
string toLineCoverage(LineCoverage line, T index)

Generate the html for a line coverage

wrapToHtml
string wrapToHtml(string content, string title)

wraps some string in a html page

Structs

CoveredFile
struct CoveredFile

Structure that represents one .lst file

LineCoverage
struct LineCoverage

The representation of a line from the .lst file

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.

Authors

Szabo Bogdan