Giter Site home page Giter Site logo

Comments (2)

stephenegriffin avatar stephenegriffin commented on June 8, 2024

Debug shows WriteRunToErrorList is throwing here:
IEnumerable<string> uriBaseIds = dataCache.SarifErrors.Select(x => x.SarifResult?.Locations?.FirstOrDefault()?.PhysicalLocation?.ArtifactLocation?.UriBaseId);

when x.SarifResult is null. Adding a ? gets us past that but then we still have the very odd File/Open dialog with no file name. We can cancel out of that and then we throw here:
Microsoft.Sarif.Viewer.SarifErrorListItem.RemapFilePath(string, string) in SarifErrorListItem.cs Microsoft.Sarif.Viewer.CodeAnalysisResultManager.RemapFilePaths(System.Collections.Generic.IList<Microsoft.Sarif.Viewer.SarifErrorListItem>, System.Collections.Generic.IEnumerable<string>, System.Collections.Generic.IEnumerable<string>) in CodeAnalysisResultManager.cs Microsoft.Sarif.Viewer.ErrorList.ErrorListService.WriteRunToErrorList(Microsoft.CodeAnalysis.Sarif.Run, string, Microsoft.CodeAnalysis.Sarif.SarifLog, out int) in ErrorListService.cs Microsoft.Sarif.Viewer.ErrorList.ErrorListService.ProcessSarifLogAsync(Microsoft.CodeAnalysis.Sarif.SarifLog, string, bool, bool) in ErrorListService.cs Microsoft.Sarif.Viewer.ErrorList.ErrorListService.ProcessLogFileCoreAsync(string, string, bool, bool, bool) in ErrorListService.cs

So my conclusion is this code is having trouble parsing my sarif and not doing a great job of making that clear.

Here's the sarif (again - produced by codeql) that you're failing to parse:
sarif.zip

from sarif-visualstudio-extension.

stephenegriffin avatar stephenegriffin commented on June 8, 2024

Here's the repo/branch that the sarif was produced against:
https://github.com/microsoft/mfcmapi/tree/u/sgriffin/codeql

from sarif-visualstudio-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.