Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about partial coverage #1598

Closed
sungam3r opened this issue Jan 22, 2024 · 1 comment
Closed

Question about partial coverage #1598

sungam3r opened this issue Jan 22, 2024 · 1 comment
Labels
untriaged To be investigated

Comments

@sungam3r
Copy link

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?

@github-actions github-actions bot added the untriaged To be investigated label Jan 22, 2024
@sungam3r
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged To be investigated
Projects
None yet
Development

No branches or pull requests

1 participant