dotnet / dotnet/fsharp

Emit an additional `ExcludeFromCodeCoverageAttribute` for generated methods

Open
#12,402 14 comments 0 reactions 0 assignees View on GitHub
Area-Debug Feature Improvement Theme-Simple-F#
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

By default, we only emit `CompilerGeneratedAttribute` for generated methods (`CompareTo`, `Equals`, etc.), and since we also generate sequence points for them, VS code analysis shows them in the report:

![image](https://user-images.githubusercontent.com/1260985/142004848-c83b9e33-b1e0-427a-afc4-a1b75bf726fa.png)

The only user-added method in picture above is `Create(int)`.

We should be emitting an `ExcludeFromCodeCoverageAttribute` for generated methods, so they can be excluded from the report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.