Giter Site home page Giter Site logo

Comments (6)

SteveGilham avatar SteveGilham commented on May 9, 2024 1

Should be fixed in release 4.0.649.

from altcover.

SteveGilham avatar SteveGilham commented on May 9, 2024

If altcover has an underlying assumption here, it's going to be that the IL it's processing looks more like what the F# compiler emits than a Roslyn compiler's output, rather than being a preference for debug over release.

The Gendarme module is used to compute method cyclometric complexity -- it's a re-implementation of the part of the Mono Gendarme library that OpenCover uses for the same purpose that exists only because there isn't a .net core version of the original available. That code may well have a tacit assumption that it would only be used on debug builds.

The code injection for branch coverage detection is intended to be agnostic as to how the IL was composed, while not triggering false positives for the many common cases where the compiler injects its own branches that only transfer control within a sequence point.

from altcover.

SteveGilham avatar SteveGilham commented on May 9, 2024

The code of interest is of the form return selection ? : yes : no; which compiles to IL which returns directly from that sequence point, wherever it is found in a method. It seems to be a fairly recognisable pattern

 brtrue.s label
...
ret
label: ...
...
ret

so that should be fairly simple to add a special case for.

from altcover.

leighshepperson avatar leighshepperson commented on May 9, 2024

Yes, great - that addition will be extremely helpful.

from altcover.

SteveGilham avatar SteveGilham commented on May 9, 2024

Pre-release build 646 contains the substantive change for the branch coverage, though not for all the related measures e.g. complexity.

from altcover.

leighshepperson avatar leighshepperson commented on May 9, 2024

Great - thank you for providing a fix, it'll be a great help

from altcover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.