Add some more Roslyn generated file suffixes#1352
Merged
MarcoRossignoli merged 1 commit intocoverlet-coverage:masterfrom Jun 24, 2022
Merged
Add some more Roslyn generated file suffixes#1352MarcoRossignoli merged 1 commit intocoverlet-coverage:masterfrom
MarcoRossignoli merged 1 commit intocoverlet-coverage:masterfrom
Conversation
petli
approved these changes
Jun 17, 2022
Collaborator
petli
left a comment
There was a problem hiding this comment.
Thank you! I think it should be pretty safe to add these additional conditions, it is quite unlikely that it will result in a module being instrumented that wasn't before.
Collaborator
|
thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.CodeAnalysisto 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😇).