On 11/15/23 01:35, Michael Kubacki wrote:
> On 11/13/2023 8:42 AM, Laszlo Ersek wrote:
>> sorry, unfinished thought:
>>
>> On 11/13/23 14:39, Laszlo Ersek wrote:
>>
>>> - the "sarif emacs" output seems a bit broken, actually, so it's not
>>> usable. Consider the following entry from the original JSON file:
>>>
>>>      }, {
>>>        "ruleId" : "cpp/missing-null-test",
>>>        "ruleIndex" : 0,
>>>        "rule" : {
>>>          "id" : "cpp/missing-null-test",
>>>          "index" : 0
>>>        },
>>>        "message" : {
>>>          "text" : "Value may be null; it should be checked before
>>> dereferencing."
>>>        },
>>>        "locations" : [ {
>>>          "physicalLocation" : {
>>>            "artifactLocation" : {
>>>              "uri" :
>>> "MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c",
>>>              "uriBaseId" : "%SRCROOT%",
>>>              "index" : 0
>>>            },
>>>            "region" : {
>>>              "startLine" : 355,
>>>              "startColumn" : 48,
>>>              "endColumn" : 52
>>>            }
>>>          }
>>>        } ],
>>>        "partialFingerprints" : {
>>>          "primaryLocationLineHash" : "f374f6e6dfc92010:1",
>>>          "primaryLocationStartColumnFingerprint" : "43"
>>>        }
>>>      }, {
>>>
>>> In the "emacs" output, it appears as:
>>>
>>> --------
>>> ModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c:355:
>>> cpp/missing-null-test Value may be null; it should be checked before
>>> dereferencing.
>>> --------
>>>
>>> Note that the first three characters, "Mde" of "Mde" are lost.
>>
>> I meant '"Mde" of "ModulePkg"'.
>>
> I was able to reproduce this with sarif-tools version 2.0.0.
> 
> It impacted other commands like "html" as well.
> 
> Applying the "--no-autotrim" option appears to leave the path alone. Can
> you please let me know if that works for you?

Yes, it does!

Thanks!
Laszlo

> 
> Also, yes, I can add this to the CodeQL GitHub workflow.
> 
>>>
>>> This issue (first three chars cut) affects all other pathnames in the
>>> emacs output too.
>>
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111266): https://edk2.groups.io/g/devel/message/111266
Mute This Topic: https://groups.io/mt/102444916/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to