hpc-codecov-0.5.0.0: Generate reports from hpc data
Copyright(c) 2022 8c6794b6
LicenseBSD3
Maintainer8c6794b6 <8c6794b6@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Trace.Hpc.Codecov.Report

Description

Generate Codecov report data.

Synopsis

Types

data Report Source #

Data type to hold information for generating test coverage report.

Constructors

Report 

Fields

Instances

Instances details
Monoid Report Source # 
Instance details

Defined in Trace.Hpc.Codecov.Report.Entry

Semigroup Report Source # 
Instance details

Defined in Trace.Hpc.Codecov.Report.Entry

Show Report Source # 
Instance details

Defined in Trace.Hpc.Codecov.Report.Entry

Eq Report Source # 
Instance details

Defined in Trace.Hpc.Codecov.Report.Entry

Methods

(==) :: Report -> Report -> Bool #

(/=) :: Report -> Report -> Bool #

data CoverageEntry Source #

Single file entry in coverage report.

Constructors

CoverageEntry 

Fields

data Format Source #

Data type for generated report format.

Constructors

Codecov

Custom Codecov JSON format. See the Codecov documentation for detail.

Since: 0.1.0.0

Lcov

LCOV tracefile format. See the geninfo manpage for detail.

Since: 0.4.0.0

Cobertura

Cobertura XML file format. See the Cobertura website for detail.

Since: 0.5.0.0

Instances

Instances details
Show Format Source # 
Instance details

Defined in Trace.Hpc.Codecov.Report.Entry

Eq Format Source # 
Instance details

Defined in Trace.Hpc.Codecov.Report.Entry

Methods

(==) :: Format -> Format -> Bool #

(/=) :: Format -> Format -> Bool #

type LineHits = [(Int, Hit)] Source #

Pair of line number and hit tag.

data Hit Source #

Data type to represent coverage of source code line.

The Int value in Partial and Full are the hit count.

Constructors

Missed

The line is not covered at all.

Partial Int

The line is partially covered.

Full Int

The line is fully covered.

Instances

Instances details
Show Hit Source # 
Instance details

Defined in Trace.Hpc.Codecov.Report.Entry

Methods

showsPrec :: Int -> Hit -> ShowS #

show :: Hit -> String #

showList :: [Hit] -> ShowS #

Eq Hit Source # 
Instance details

Defined in Trace.Hpc.Codecov.Report.Entry

Methods

(==) :: Hit -> Hit -> Bool #

(/=) :: Hit -> Hit -> Bool #

type FunctionHits = [(Int, Int, Int, String)] Source #

Type synonym for tracking function enter count. Elements are start line number, end line number, execution count, and function name.

Since: 0.4.0.0

type BranchHits = [(Int, Int, Bool, Int)] Source #

Type synonym for tracking branch information. Elements are start line number, branch block number, Bool for the taken branch, and execution count.

Since: 0.4.0.0

Functions

genReport :: Report -> IO () Source #

Generate report data from options.

genCoverageEntries :: Report -> IO [CoverageEntry] Source #

Generate test coverage entries.

emitCoverage Source #

Arguments

:: Format

Format of the report.

Since: 0.4.0.0

-> Maybe FilePath

Just output file name, or Nothing for stdout.

-> [CoverageEntry]

Coverage entries to write.

-> IO () 

Emit simple coverage data.