-
-
Notifications
You must be signed in to change notification settings - Fork 298
Open
Labels
Description
Describe the bug
Perhaps I am missing something, but I believe the Equals(object) implementation in CodeFile.cs does not account for different path separators on different operating systems:
public override bool Equals(object obj)
{
if (obj == null || !obj.GetType().Equals(typeof(CodeFile)))
{
return false;
}
else
{
var codeFile = (CodeFile)obj;
string fileNameToCompare = codeFile.Path.Substring(codeFile.Path.LastIndexOf('\\') + 1);
string fileName = this.Path.Substring(this.Path.LastIndexOf('\\') + 1);
return fileName.Equals(fileNameToCompare, StringComparison.OrdinalIgnoreCase);
}
}I think this is causing different behavior in a build pipeline I am using when run on a Windows build agent vs Linux build agent and merging coverage reports generated on different operating systems.
Reactions are currently unavailable