Skip to content

DoesNotReturnAttribute does not automatically do what one would think #1234

@Saborion

Description

@Saborion

I and my colleague got curious to as why we did not get full line coverage on the closing curly brace in a block-statement that ended on a method that does not return, especially since we had added the System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute to the method. We began to research this and managed to stumble upon coverlets --does-not-return-attribute command line argument, which solved the problem. We do, however, find it more than a little strange that coverlet does not automatically handle that attribute the way one would expect, given intended usage of the attribute.

Is this a "missing feature" or is it working as intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThis issue is a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions