Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/coverlet.core/Helpers/InstrumentationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public bool EmbeddedPortablePdbHasLocalSource(string module, out string firstNot
// We verify all docs and return false if not all are present in local
// We could have false negative if doc is not a source
// Btw check for all possible extension could be weak approach
if (!_fileSystem.Exists(docName))
// We exlude from the check the autogenerated source file(i.e. source generators)
if (!_fileSystem.Exists(docName) && !docName.EndsWith(".g.cs"))
{
firstNotFoundDocument = docName;
return false;
Expand Down Expand Up @@ -172,7 +173,8 @@ public bool PortablePdbHasLocalSource(string module, out string firstNotFoundDoc
// We verify all docs and return false if not all are present in local
// We could have false negative if doc is not a source
// Btw check for all possible extension could be weak approach
if (!_fileSystem.Exists(docName))
// We exlude from the check the autogenerated source file(i.e. source generators)
if (!_fileSystem.Exists(docName) && !docName.EndsWith(".g.cs"))
{
firstNotFoundDocument = docName;
return false;
Expand Down