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.
$xml = Compress-Branching -WithinSequencePoint -InputFile "./Tests/Compressible.xml" -OutputFile "./_Packaging/CompressInterior.xml"
public class CompressBranchingCommand : PSCmdlet
| name | description |
|---|---|
| CompressBranchingCommand() | The default constructor. |
| InputFile { get; set; } | Input as file path |
| OutputFile { get; set; } | Output as file path |
| SameSpan { get; set; } | Merge branches when start and end at the same place |
| WithinSequencePoint { get; set; } | Discard branches within a sequence point |
| XDocument { get; set; } | Input as XDocument value |
| override ProcessRecord() | Create transformed document |