-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
return uri.MakeRelativeUri(begin.ResultFile.Uri).ToString().Replace("//", "\\"); |
If the project path contains any dots, e.g.: /builds/my_group/ns.myproject
the roslynator converter correctly transforms the root paths.
However the Sarif Converters make use of the MakeRelativeUri
function, which will treat the string wrong.
I suggest using something more robust like
var uri = new Uri(pathRoot);
var absolutePath = begin.ResultFile.Uri.LocalPath;
var rootPath = uri.LocalPath;
if (absolutePath.StartsWith(rootPath))
{
return absolutePath.Substring(rootPath.Length).Replace("//", "\\");
}
return begin.ResultFile.Uri.MakeRelativeUri(uri).ToString().Replace("//", "\\");
Metadata
Metadata
Assignees
Labels
No labels