coverlet-coverage / coverlet

Cross platform code coverage for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about partial coverage

sungam3r opened this issue · comments

Hi. I have a project https://github.com/destructurama/by-ignoring with installed CodeCov integration. Now I see single partially covered line here https://app.codecov.io/gh/destructurama/by-ignoring/blob/master/src%2FDestructurama.ByIgnoring%2FByIgnoring%2FDestructureByIgnoringPolicy.cs#L104 but both branches of ternary operator are covered.
изображение
Part of coverage file for this method:

 <Method cyclomaticComplexity="2" nPathComplexity="2" sequenceCoverage="100" branchCoverage="50" isConstructor="True" isGetter="False" isSetter="False" isStatic="True">
              <Summary numSequencePoints="3" visitedSequencePoints="3" numBranchPoints="2" visitedBranchPoints="1" sequenceCoverage="100" branchCoverage="50" maxCyclomaticComplexity="2" minCyclomaticComplexity="2" visitedClasses="0" numClasses="0" visitedMethods="1" numMethods="1" />
              <MetadataToken />
              <Name>Serilog.Events.LogEventPropertyValue Destructurama.ByIgnoring.DestructureByIgnoringPolicy::BuildLogEventProperty(System.Object,Serilog.Core.ILogEventPropertyValueFactory)</Name>
              <FileRef uid="31" />
              <SequencePoints>
                <SequencePoint vc="22" uspid="104" ordinal="0" sl="104" sc="1" el="104" ec="2" bec="2" bev="1" fileid="31" />
                <SequencePoint vc="22" uspid="105" ordinal="1" sl="105" sc="1" el="105" ec="2" bec="0" bev="0" fileid="31" />
                <SequencePoint vc="22" uspid="106" ordinal="2" sl="106" sc="1" el="106" ec="2" bec="0" bev="0" fileid="31" />
              </SequencePoints>
              <BranchPoints>
                <BranchPoint vc="22" uspid="104" ordinal="0" path="0" offset="1" offsetend="3" sl="104" fileid="31" />
                <BranchPoint vc="0" uspid="104" ordinal="1" path="1" offset="1" offsetend="13" sl="104" fileid="31" />
              </BranchPoints>
              <MethodPoint vc="3" uspid="0" p8:type="SequencePoint" ordinal="3" offset="3" sc="0" sl="104" ec="1" el="106" bec="0" bev="0" fileid="31" xmlns:p8="xsi" />
            </Method>

How can this be?

Nevermind. Indeed first branch was not covered by tests. This is an issue with coloring.