This was with VS2022 17.5 and the Microsoft SARIF Viewer 2022 3.0.115.33558. The compiler used was from 17.4 msvc v14.34.31942.
The first was when I tried to open a .sarif compiled with /Wall (just so it would contain many warnings so I could see how that looked)
Processing the SARIF log file `D:\FN\Engine\Intermediate\Build\Win64\UnrealGame\Development\Core\Module.Core.1_of_16.cpp.sarif`.
An error occurred while processing SARIF log file `D:\FN\Engine\Intermediate\Build\Win64\UnrealGame\Development\Core\Module.Core.1_of_16.cpp.sarif` due to error: `JSON integer 18446744073709551615 is too large or small for an Int32. Path 'runs[0].results[662].relatedLocations[0].physicalLocation.region.startColumn', line 23339, position 71.`.
Opening file: D:\FN\Engine\Intermediate\Build\Win64\UnrealGame\Development\Core\Module.Core.1_of_16.cpp.sarif content type: SARIF
The second is when I tried to open a .sarif that contained no errors or warnings:
Processing the SARIF log file `D:\FN\Engine\Intermediate\Build\Win64\UnrealGame\Development\BuildSettings\Module.BuildSettings.cpp.sarif`.
An error occurred while processing SARIF log file `D:\FN\Engine\Intermediate\Build\Win64\UnrealGame\Development\BuildSettings\Module.BuildSettings.cpp.sarif` due to error: `Required property 'driver' not found in JSON. Path 'runs[0].tool', line 7, position 22.`.
Opening file: D:\FN\Engine\Intermediate\Build\Win64\UnrealGame\Development\BuildSettings\Module.BuildSettings.cpp.sarif content type: SARIF
Ah sorry, I just checked and the JSON integer 18446744073709551615 is too large or small for an Int32. error is already fixed with VS2022 17.6 Preview 1.
I've come across two issues when trying to load .sarif logs generated with VS2022 by passing
/experimental:log <path>
to cl.exe when I was experimenting on the UnrealEngine code base. (Xiang from https://devblogs.microsoft.com/cppblog/the-future-of-c-compiler-diagnostics-in-msvc-and-visual-studio/ sent me this argument to test out)This was with VS2022 17.5 and the Microsoft SARIF Viewer 2022 3.0.115.33558. The compiler used was from 17.4 msvc v14.34.31942.
The first was when I tried to open a .sarif compiled with /Wall (just so it would contain many warnings so I could see how that looked)
Module.Core.1_of_16.cpp.sarif.log
The second is when I tried to open a .sarif that contained no errors or warnings:
Module.BuildSettings.cpp.sarif.log
I'll note that an empty .sarif generated with
/analyze:log <path>
does not have this issue:Module.BuildSettings.cpp.sa.sarif.log