Giter Club home page Giter Club logo

Comments (5)

SteveGilham avatar SteveGilham commented on August 25, 2024 1

And formally in release 3.5.580

from altcover.

SteveGilham avatar SteveGilham commented on August 25, 2024

I have a what looks like repro for this (my current development system, and ReportGenerator 3.1.2)

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Palmmedia.ReportGenerator.Parser.OpenCoverParser.<>c.<ProcessClass>b__13_5(XElement m)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Palmmedia.ReportGenerator.Parser.OpenCoverParser.ProcessClass(Dictionary`2 fileIdsByFilename, Assembly assembly, String className)
...

In the generated coverage report, a filtered method looks like

            <Method skippedDueTo="Filter" visited="false" cyclomaticComplexity="1" nPathComplexity="0" sequenceCoverage="0" branchCoverage="0" isConstructor="false" isStatic="true" isGetter="false" isSetter="false" crapScore="0">
              <Summary numSequencePoints="0" visitedSequencePoints="0" numBranchPoints="0" visitedBranchPoints="0" sequenceCoverage="0" branchCoverage="0" maxCyclomaticComplexity="0" minCyclomaticComplexity="0" visitedClasses="0" numClasses="0" visitedMethods="0" numMethods="0" minCrapScore="0" maxCrapScore="0" />
              <MetadataToken>100663299</MetadataToken>
              <Name>System.Void N.DU::testMakeUnion()</Name>
              <FileRef />
              <SequencePoints />
              <BranchPoints />
              <MethodPoint />
            </Method>

Editing the report file to remove the empty FileRef tag and re-running the report generation worked OK.

tl;dr it's a Postel's Principle fail. I'm not emitting conservatively enough.

from altcover.

danielpalme avatar danielpalme commented on August 25, 2024

I'm currently expecting that the <FileRef /> element contains an uid attribute. Can you supply this even if the method is filtered?

from altcover.

SteveGilham avatar SteveGilham commented on August 25, 2024

It's actually simpler for me to omit the tag entirely for methods that aren't being instrumented, and the ReportGenerator seems happy enough with that, too.

from altcover.

SteveGilham avatar SteveGilham commented on August 25, 2024

Pre-release build available for testing -- otherwise it'll be in the next release

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.