-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New parameter ExcludeAssembliesWithoutSources to control automatic assembly exclusion #1164
Comments
A more consistent parameter name may be (Edit: the description above have been updated to this name now, replacing the original idea |
Ran into this because we heavily use this library: https://github.com/mcintyre321/OneOf with the source generator. It generates Due to this only 2 of our 61 projects are able to be covered. We also use internal source generators. Relying on file suffix isn't really an option when you start using 3rd parties. |
I start working on this. But it could take some time 🙏. |
OK I just stumbled across this pr #1360, which basically already covers |
I know this is closed, but ".generated.cs" is a pretty common naming style, as it ".designer.cs". Is there some reason that coverlet doesn't support all three? |
@MelGrubb I think they are all supported in the current version https://github.com/coverlet-coverage/coverlet/pull/1392/files#diff-be914c2ef40b4434ccb0927c453da5f7f2a4f828d601367f585bd7284349ba85L486-L490 but I also could be wrong. At least I'm sure that in the upcoming version we removed this restriction completely and |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [coverlet.collector](https://github.com/coverlet-coverage/coverlet) | nuget | major | `3.2.0` -> `6.0.0` | --- ### Release Notes <details> <summary>coverlet-coverage/coverlet</summary> ### [`v6.0.0`](https://github.com/coverlet-coverage/coverlet/releases/tag/v6.0.0) Fixed \-Could not write lines to file CoverletSourceRootsMapping - in use by another process[https://github.com/coverlet-coverage/coverlet/issues/1155](https://github.com/coverlet-coverage/coverlet/issues/1155)5 -Incorrect coverage for methods returning IAsyncEnumerable in generic classes[https://github.com/coverlet-coverage/coverlet/issues/1383](https://github.com/coverlet-coverage/coverlet/issues/1383)3 -Wrong branch coverage for async methods .NET Standard 1.x[https://github.com/coverlet-coverage/coverlet/issues/1376](https://github.com/coverlet-coverage/coverlet/issues/1376)6 -Empty path exception in visual basic projects[https://github.com/coverlet-coverage/coverlet/issues/775](https://github.com/coverlet-coverage/coverlet/issues/775)5 -Allign published nuget package version to github release version[https://github.com/coverlet-coverage/coverlet/issues/1413](https://github.com/coverlet-coverage/coverlet/issues/1413)3 \-Sync nuget and github release version[https://github.com/coverlet-coverage/coverlet/issues/1122](https://github.com/coverlet-coverage/coverlet/issues/1122)22 Improvements \-Migration of the project to .NET 6.0[https://github.com/coverlet-coverage/coverlet/pull/1473](https://github.com/coverlet-coverage/coverlet/pull/1473)3 Breaking changes New parameter ExcludeAssembliesWithoutSources to control automatic assembly exclusion [https://github.com/coverlet-coverage/coverlet/issues/1164](https://github.com/coverlet-coverage/coverlet/issues/1164). The parameter InstrumentModulesWithoutLocalSources has been removed. since it can be handled by setting ExcludeAssembliesWithoutSources to None. The default heuristics for determining whether to instrument an assembly has been changed. In previous versions any missing source file was taken as a signal that it was a third-party project that shouldn't be instrumented, with exceptions for some common file name patterns for source generators. Now only assemblies where no source files at all can be found are excluded from instrumentation, and the code for detecting source generator files have been removed. To get back to the behaviour that at least one missing file is sufficient to exclude an assembly, set ExcludeAssembliesWithoutSources to MissingAny, or use assembly exclusion filters for more fine-grained control. [Diff between 3.2.0 and 6.0.0](https://github.com/coverlet-coverage/coverlet/compare/v5.7.2...v6.0.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/cythral/brighid-commands). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzUuOTcuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [coverlet.collector](https://github.com/coverlet-coverage/coverlet) | nuget | major | `3.2.0` -> `6.0.0` | --- ### Release Notes <details> <summary>coverlet-coverage/coverlet</summary> ### [`v6.0.0`](https://github.com/coverlet-coverage/coverlet/releases/tag/v6.0.0) Fixed \-Could not write lines to file CoverletSourceRootsMapping - in use by another process[https://github.com/coverlet-coverage/coverlet/issues/1155](https://github.com/coverlet-coverage/coverlet/issues/1155)5\ \-Incorrect coverage for methods returning IAsyncEnumerable in generic classes[https://github.com/coverlet-coverage/coverlet/issues/1383](https://github.com/coverlet-coverage/coverlet/issues/1383)3\ \-Wrong branch coverage for async methods .NET Standard 1.x[https://github.com/coverlet-coverage/coverlet/issues/1376](https://github.com/coverlet-coverage/coverlet/issues/1376)6\ \-Empty path exception in visual basic projects[https://github.com/coverlet-coverage/coverlet/issues/775](https://github.com/coverlet-coverage/coverlet/issues/775)5\ \-Align published nuget package version to github release version[https://github.com/coverlet-coverage/coverlet/issues/1413](https://github.com/coverlet-coverage/coverlet/issues/1413)3\ \-Sync nuget and github release versions[https://github.com/coverlet-coverage/coverlet/issues/1122](https://github.com/coverlet-coverage/coverlet/issues/1122)2 Improvements \-Migration of the project to .NET 6.0[https://github.com/coverlet-coverage/coverlet/pull/1473](https://github.com/coverlet-coverage/coverlet/pull/1473)3 Breaking changes New parameter ExcludeAssembliesWithoutSources to control automatic assembly exclusion [https://github.com/coverlet-coverage/coverlet/issues/1164](https://github.com/coverlet-coverage/coverlet/issues/1164). The parameter InstrumentModulesWithoutLocalSources has been removed. since it can be handled by setting ExcludeAssembliesWithoutSources to None. The default heuristics for determining whether to instrument an assembly has been changed. In previous versions any missing source file was taken as a signal that it was a third-party project that shouldn't be instrumented, with exceptions for some common file name patterns for source generators. Now only assemblies where no source files at all can be found are excluded from instrumentation, and the code for detecting source generator files have been removed. To get back to the behaviour that at least one missing file is sufficient to exclude an assembly, set ExcludeAssembliesWithoutSources to MissingAny, or use assembly exclusion filters for more fine-grained control. [Diff between 3.2.0 and 6.0.0](https://github.com/coverlet-coverage/coverlet/compare/v5.7.2...v6.0.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/Testably/Testably.Abstractions). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzUuOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [coverlet.collector](https://github.com/coverlet-coverage/coverlet) | nuget | major | `3.2.0` -> `6.0.0` | --- ### Release Notes <details> <summary>coverlet-coverage/coverlet</summary> ### [`v6.0.0`](https://github.com/coverlet-coverage/coverlet/releases/tag/v6.0.0) Fixed \-Could not write lines to file CoverletSourceRootsMapping - in use by another process[https://github.com/coverlet-coverage/coverlet/issues/1155](https://github.com/coverlet-coverage/coverlet/issues/1155)5\ \-Incorrect coverage for methods returning IAsyncEnumerable in generic classes[https://github.com/coverlet-coverage/coverlet/issues/1383](https://github.com/coverlet-coverage/coverlet/issues/1383)3\ \-Wrong branch coverage for async methods .NET Standard 1.x[https://github.com/coverlet-coverage/coverlet/issues/1376](https://github.com/coverlet-coverage/coverlet/issues/1376)6\ \-Empty path exception in visual basic projects[https://github.com/coverlet-coverage/coverlet/issues/775](https://github.com/coverlet-coverage/coverlet/issues/775)5\ \-Align published nuget package version to github release version[https://github.com/coverlet-coverage/coverlet/issues/1413](https://github.com/coverlet-coverage/coverlet/issues/1413)3\ \-Sync nuget and github release versions[https://github.com/coverlet-coverage/coverlet/issues/1122](https://github.com/coverlet-coverage/coverlet/issues/1122)2 Improvements \-Migration of the project to .NET 6.0[https://github.com/coverlet-coverage/coverlet/pull/1473](https://github.com/coverlet-coverage/coverlet/pull/1473)3 Breaking changes New parameter ExcludeAssembliesWithoutSources to control automatic assembly exclusion [https://github.com/coverlet-coverage/coverlet/issues/1164](https://github.com/coverlet-coverage/coverlet/issues/1164). The parameter InstrumentModulesWithoutLocalSources has been removed. since it can be handled by setting ExcludeAssembliesWithoutSources to None. The default heuristics for determining whether to instrument an assembly has been changed. In previous versions any missing source file was taken as a signal that it was a third-party project that shouldn't be instrumented, with exceptions for some common file name patterns for source generators. Now only assemblies where no source files at all can be found are excluded from instrumentation, and the code for detecting source generator files have been removed. To get back to the behaviour that at least one missing file is sufficient to exclude an assembly, set ExcludeAssembliesWithoutSources to MissingAny, or use assembly exclusion filters for more fine-grained control. [Diff between 3.2.0 and 6.0.0](https://github.com/coverlet-coverage/coverlet/compare/v5.7.2...v6.0.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 2am" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ThorstenSauter/NoPlan). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzUuOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [coverlet.collector](https://github.com/coverlet-coverage/coverlet) | nuget | major | `3.2.0` -> `6.0.0` | --- ### Release Notes <details> <summary>coverlet-coverage/coverlet</summary> ### [`v6.0.0`](https://github.com/coverlet-coverage/coverlet/releases/tag/v6.0.0) Fixed \-Could not write lines to file CoverletSourceRootsMapping - in use by another process[https://github.com/coverlet-coverage/coverlet/issues/1155](https://github.com/coverlet-coverage/coverlet/issues/1155)5\ \-Incorrect coverage for methods returning IAsyncEnumerable in generic classes[https://github.com/coverlet-coverage/coverlet/issues/1383](https://github.com/coverlet-coverage/coverlet/issues/1383)3\ \-Wrong branch coverage for async methods .NET Standard 1.x[https://github.com/coverlet-coverage/coverlet/issues/1376](https://github.com/coverlet-coverage/coverlet/issues/1376)6\ \-Empty path exception in visual basic projects[https://github.com/coverlet-coverage/coverlet/issues/775](https://github.com/coverlet-coverage/coverlet/issues/775)5\ \-Align published nuget package version to github release version[https://github.com/coverlet-coverage/coverlet/issues/1413](https://github.com/coverlet-coverage/coverlet/issues/1413)3\ \-Sync nuget and github release versions[https://github.com/coverlet-coverage/coverlet/issues/1122](https://github.com/coverlet-coverage/coverlet/issues/1122)2 Improvements \-Migration of the project to .NET 6.0[https://github.com/coverlet-coverage/coverlet/pull/1473](https://github.com/coverlet-coverage/coverlet/pull/1473)3 Breaking changes New parameter ExcludeAssembliesWithoutSources to control automatic assembly exclusion [https://github.com/coverlet-coverage/coverlet/issues/1164](https://github.com/coverlet-coverage/coverlet/issues/1164). The parameter InstrumentModulesWithoutLocalSources has been removed. since it can be handled by setting ExcludeAssembliesWithoutSources to None. The default heuristics for determining whether to instrument an assembly has been changed. In previous versions any missing source file was taken as a signal that it was a third-party project that shouldn't be instrumented, with exceptions for some common file name patterns for source generators. Now only assemblies where no source files at all can be found are excluded from instrumentation, and the code for detecting source generator files have been removed. To get back to the behaviour that at least one missing file is sufficient to exclude an assembly, set ExcludeAssembliesWithoutSources to MissingAny, or use assembly exclusion filters for more fine-grained control. [Diff between 3.2.0 and 6.0.0](https://github.com/coverlet-coverage/coverlet/compare/v5.7.2...v6.0.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/Testably/Testably.Architecture.Rules). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45OC4wIiwidXBkYXRlZEluVmVyIjoiMzUuOTguMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Valentin Breuß <vbreuss@gmail.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [coverlet.collector](https://github.com/coverlet-coverage/coverlet) | nuget | major | `3.2.0` -> `6.0.0` | | [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) | nuget | major | `3.2.0` -> `6.0.0` | --- ### Release Notes <details> <summary>coverlet-coverage/coverlet</summary> ### [`v6.0.0`](https://github.com/coverlet-coverage/coverlet/releases/tag/v6.0.0) Fixed \-Could not write lines to file CoverletSourceRootsMapping - in use by another process[https://github.com/coverlet-coverage/coverlet/issues/1155](https://github.com/coverlet-coverage/coverlet/issues/1155)5\ \-Incorrect coverage for methods returning IAsyncEnumerable in generic classes[https://github.com/coverlet-coverage/coverlet/issues/1383](https://github.com/coverlet-coverage/coverlet/issues/1383)3\ \-Wrong branch coverage for async methods .NET Standard 1.x[https://github.com/coverlet-coverage/coverlet/issues/1376](https://github.com/coverlet-coverage/coverlet/issues/1376)6\ \-Empty path exception in visual basic projects[https://github.com/coverlet-coverage/coverlet/issues/775](https://github.com/coverlet-coverage/coverlet/issues/775)5\ \-Align published nuget package version to github release version[https://github.com/coverlet-coverage/coverlet/issues/1413](https://github.com/coverlet-coverage/coverlet/issues/1413)3\ \-Sync nuget and github release versions[https://github.com/coverlet-coverage/coverlet/issues/1122](https://github.com/coverlet-coverage/coverlet/issues/1122)2 Improvements \-Migration of the project to .NET 6.0[https://github.com/coverlet-coverage/coverlet/pull/1473](https://github.com/coverlet-coverage/coverlet/pull/1473)3 Breaking changes New parameter ExcludeAssembliesWithoutSources to control automatic assembly exclusion [https://github.com/coverlet-coverage/coverlet/issues/1164](https://github.com/coverlet-coverage/coverlet/issues/1164). The parameter InstrumentModulesWithoutLocalSources has been removed. since it can be handled by setting ExcludeAssembliesWithoutSources to None. The default heuristics for determining whether to instrument an assembly has been changed. In previous versions any missing source file was taken as a signal that it was a third-party project that shouldn't be instrumented, with exceptions for some common file name patterns for source generators. Now only assemblies where no source files at all can be found are excluded from instrumentation, and the code for detecting source generator files have been removed. To get back to the behaviour that at least one missing file is sufficient to exclude an assembly, set ExcludeAssembliesWithoutSources to MissingAny, or use assembly exclusion filters for more fine-grained control. [Diff between 3.2.0 and 6.0.0](https://github.com/coverlet-coverage/coverlet/compare/v5.7.2...v6.0.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/bruxisma/atmosphere). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzUuOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Signed-off-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) | `3.2.0` -> `6.0.0` | [![age](https://developer.mend.io/api/mc/badges/age/nuget/coverlet.msbuild/6.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/coverlet.msbuild/6.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/coverlet.msbuild/3.2.0/6.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/coverlet.msbuild/3.2.0/6.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>coverlet-coverage/coverlet (coverlet.msbuild)</summary> ### [`v6.0.0`](https://github.com/coverlet-coverage/coverlet/releases/tag/v6.0.0) Fixed \-Could not write lines to file CoverletSourceRootsMapping - in use by another process[https://github.com/coverlet-coverage/coverlet/issues/1155](https://github.com/coverlet-coverage/coverlet/issues/1155)5\ \-Incorrect coverage for methods returning IAsyncEnumerable in generic classes[https://github.com/coverlet-coverage/coverlet/issues/1383](https://github.com/coverlet-coverage/coverlet/issues/1383)3\ \-Wrong branch coverage for async methods .NET Standard 1.x[https://github.com/coverlet-coverage/coverlet/issues/1376](https://github.com/coverlet-coverage/coverlet/issues/1376)6\ \-Empty path exception in visual basic projects[https://github.com/coverlet-coverage/coverlet/issues/775](https://github.com/coverlet-coverage/coverlet/issues/775)5\ \-Align published nuget package version to github release version[https://github.com/coverlet-coverage/coverlet/issues/1413](https://github.com/coverlet-coverage/coverlet/issues/1413)3\ \-Sync nuget and github release versions[https://github.com/coverlet-coverage/coverlet/issues/1122](https://github.com/coverlet-coverage/coverlet/issues/1122)2 Improvements \-Migration of the project to .NET 6.0[https://github.com/coverlet-coverage/coverlet/pull/1473](https://github.com/coverlet-coverage/coverlet/pull/1473)3 Breaking changes New parameter ExcludeAssembliesWithoutSources to control automatic assembly exclusion [https://github.com/coverlet-coverage/coverlet/issues/1164](https://github.com/coverlet-coverage/coverlet/issues/1164). The parameter InstrumentModulesWithoutLocalSources has been removed. since it can be handled by setting ExcludeAssembliesWithoutSources to None. The default heuristics for determining whether to instrument an assembly has been changed. In previous versions any missing source file was taken as a signal that it was a third-party project that shouldn't be instrumented, with exceptions for some common file name patterns for source generators. Now only assemblies where no source files at all can be found are excluded from instrumentation, and the code for detecting source generator files have been removed. To get back to the behaviour that at least one missing file is sufficient to exclude an assembly, set ExcludeAssembliesWithoutSources to MissingAny, or use assembly exclusion filters for more fine-grained control. [Diff between 3.2.0 and 6.0.0](https://github.com/coverlet-coverage/coverlet/compare/v5.7.2...v6.0.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/apollographql/federation-hotchocolate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Problem
Coverlet automatically excludes third-party assemblies from the coverage analysis, since they are usually not interesting to the user. The heuristic for determining if an assembly is a third-party dependency is if any of its source documents does not have a corresponding source file.
(Ref:
coverlet/src/coverlet.core/Helpers/InstrumentationHelper.cs
Lines 125 to 129 in 3ae1976
C# source generators and some F# constructs add source documents to firsrt-party assemblies, causing them to be excluded by this heuristic, and compiler bugs may also trigger this. See e.g. #1084 #1145 #1100 #1297
The C# source generators are handled by identifying them using a best practice that the document names should end in ".g.cs", and similar logic can be added for the other issues. But the source generator naming is but a best practice and not all projects will follow it, and new compiler issues will likely turn up in the future, so this heuristic will continue to cause issues.
Suggested solution
Add a new parameter
ExcludeAssembliesWithoutSources
with the valuesMissingAny
,MissingAll
andNone
.MissingAny
is the current behaviour, butMissingAll
would be the new default behaviour to avoid these and future issues with generators.None
would be a new setting to never filter on source files, for those rare cases where it may not make sense. Explicit include/exclude settings would override any filtering from this parameter.Changing the default to include an assembly in the coverage if at least one source document exist may cause some third-party documents to be included, if the same file name exists in the project being analysed with coverlet (pointed out by @daveMueller). Users affected by this can then either change the setting to
MissingAny
to revert to the old behaviour, or explicitly exclude those assemblies.Coverlet should still have a heuristic to ignore generated source files according to conventions, but now to avoid logging those cases.
(Edit: change parameter name in feature description to
ExcludeAssembliesWithoutSources
)The text was updated successfully, but these errors were encountered: