altcover

OpenCover.CompressBranching method

Removes compiler-generated hidden branches from OpenCover.

Takes output from the OpenCover program, and adjust from OpenCover’s liberal idea of significant branches towards AltCover’s more restricted approach – chose either or both of sameSpan to unify branches that go from the same start, and take the same trajectory to the same end (OpenCover issue #786 being one instance of this) and withinSequencePoint to remove branches interior to a statement (compiler generated things like stashing of lambdas, the hidden conditional Dispose() after a using, or inside F# inlines – OpenCover issues #657, #807 being instances of this).

Either takes an XDocument from the pipeline or from a file; emits the result as an XDocument to the pipeline and optionally to a file.

public static XDocument CompressBranching(XDocument document, bool withinSequencePoint, 
    bool sameSpan)
parameter description
document The input report
withinSequencePoint Whether to hide branches that terminate inside the same sequence point as they begin
sameSpan Whether to treat branches between the same points as being the same branch

Return Value

The filled-in report

See Also