coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.94k stars 385 forks source link

Exclude Views (AspNetCoreGeneratedDocument) folder from coverage coverlet #1375

Open yacine-karim opened 1 year ago

yacine-karim commented 1 year ago

Discussed in https://github.com/coverlet-coverage/coverlet/discussions/1374

Originally posted by **dev0karim0yassine** August 26, 2022 Hello everyone I have this class **AspNetCoreGeneratedDocument.Views_Users__AddOrUpdateUser** appearring in the code coverage result _Assembly_: **Solution.Web** _Class_: **AspNetCoreGeneratedDocument.Views_Users__AddOrUpdateUse** When i click on the class to check it, it takes me to the **_AddOrUpdateUser** View in the view folder Path: **D:\a\1\s\Solution.Web\Views\Users\_AddOrUpdateUser.cshtml** I want to exclude this folder using the **.runsettings** file: ``` **/Solution.Web/Views/*.cshtml false false ```
MarcoRossignoli commented 1 year ago

Why don't filter by type name? I don't know if the pdb will report Users_AddOrUpdateUser.cshtml as source file and maybe we cannot exclude it(but I didn't investigate).

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 3 months with no activity.

BodanGjozinski commented 3 months ago

Hey everyone,

So this issue is the same as this one: Same Issue

And i also answered it on Stack overflow i think for the same person a year and a half late 😄 Stack overflow question

github-actions[bot] commented 1 day ago

This issue is stale because it has been open for 3 months with no activity.