Add some more Roslyn generated file suffixes #1352
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #1084, coverlet fails to generate metrics for assemblies that contain source generators. This was improved in #1091 by skipping files that end in
.g.cs
. However, some source generators produce files which do not match this pattern - for exampleprotobuf-net.BuildTools
. Obviously coverlet is never going to be able to match against every possible generated file naming convention - which is where the suggestion in #1164 comes from. I understand if you'd rather use the ideas from that issue in preference to this change, however, I thought it might make sense to add the list of conventions used internally byMicrosoft.CodeAnalysis
to the logic introduced in #1091 for detecting auto-generated files (selfishly, this would also fix the issues I'm having with projects that referenceprotobuf-net.BuildTools
😇).