From f11a3dfb1f27e777931d4a9337c672a1ce164538 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 27 Jul 2023 22:13:18 -0400 Subject: [PATCH] HdfConverter: Set ArtifactLocation and Region using SourceLocation Signed-off-by: Craig Andrews --- src/Sarif.Converters/HdfConverter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Sarif.Converters/HdfConverter.cs b/src/Sarif.Converters/HdfConverter.cs index 49772ed0a..b775f38fc 100644 --- a/src/Sarif.Converters/HdfConverter.cs +++ b/src/Sarif.Converters/HdfConverter.cs @@ -173,14 +173,14 @@ private static (ReportingDescriptor, IList) SarifRuleAndResultFromHdfCon { ArtifactLocation = new ArtifactLocation { - Uri = new Uri(".", UriKind.Relative), + Uri = new Uri(execJsonControl.SourceLocation.Ref ?? "", UriKind.Relative), UriBaseId = "ROOTPATH", }, Region = new Region { - StartLine = 1, + StartLine = execJsonControl.SourceLocation.Line ?? 1, StartColumn = 1, - EndLine = 1, + EndLine = execJsonControl.SourceLocation.Line ?? 1, EndColumn = 1, } }