GithubHelp home page GithubHelp logo

Comments (6)

edkazcarlson-ms avatar edkazcarlson-ms commented on June 14, 2024 1

@yongyan-gh I believe I have fixed the bug, please confirm that the changes in #611 fix the issue you are seeing :)

from sarif-visualstudio-extension.

edkazcarlson-ms avatar edkazcarlson-ms commented on June 14, 2024 1

Also usually Chris reviews my PR's but it seems like he's OOF, could you review #610 along with #611 when you get the chance? Thank you.

from sarif-visualstudio-extension.

yongyan-gh avatar yongyan-gh commented on June 14, 2024

@EasyRhinoMSFT / @edkazcarlson-ms , a question about code finder:

In ErrorListService.WriteRunToErrorList() method, it calls code finder to try to find best match for each SARIF result after loading a SARIF log.

Is it a hard requirement to make the code finder work? Or can it be happened when user navigates to the particular results (double clicking the error item)? the viewer used to do the file location remapping when user navigates to the result, not after loading a SARIF result.

from sarif-visualstudio-extension.

edkazcarlson-ms avatar edkazcarlson-ms commented on June 14, 2024

I'm slightly confused about the repro steps/ what is expected
On my machine when I opened the .sarif file I got these 2 errors in my list
image

from there when I clicked on the 2nd one (SEC101/166) it was able to automatically jump me to the 1_Run Terratest file with no issues/remap popup.
When I tried to click the WRN999.... error I was greeted with a popup about remapping, however when looking at the sarif file I don't see any indication of what file the invocation is tied with (I'm assuming it's supposed to be the same file but I don't see anything in the .sarif file indicating this). When looking at the specs, it looks like invocations don't have a particular location they're tied w/ so I don't understand what the expected behavior is.

If possible can I get:

  • The commit that your version of the extension is running on (currently attempted repro from main)
  • The version of VS (mine is 17.7.6)
  • expected behavior

While running the code finder and other remapping logic at load time is not necessarily a hard requirement, if I remember correctly the previous setup where the remapping occurred later made some extremely nasty bugs as well as being less efficient since we can optimize some of the mapping logic if we do it in batches.

from sarif-visualstudio-extension.

yongyan-gh avatar yongyan-gh commented on June 14, 2024

@edkazcarlson-ms thanks for looking! lets look at the first issue for now. Below is my repro envionrment and steps:

Commit: 83f5879
VS version: 17.7.6

Repro:

  1. Download the attached zip file and unzip the file to your local disk, e.g. "C:\SarifLog". Then the sarif log file path should be "C:\SarifLog\repros\testthis\repro.sarif".

  2. Edit above repro.sarif file, make sure the only result's artifactLocation.Uri path points to the file in your local path. e.g. "file:///C:/SarifLog/repros/testthis/Azure/azure-data-labs-modules/5690656642/1_Run%20Terratest.txt".

  3. Launch VS and open the repro.sarif log file.

Expected behavior:

  • The viewer opens the Sarif log content in editor window and load the 2 results in the ErrorList window, without popping up a
    open file dialog asking user to select the target file, because the Sarif log result already point to the file in your local disk.

Actual behavior:

  • The viewer pops up open file dialog asking the target file location, after user selects the target file, it opens the Sarif log content in editor window and load the 2 results in the ErrorList window.

Let me know if any question to repro. Thanks!

from sarif-visualstudio-extension.

edkazcarlson-ms avatar edkazcarlson-ms commented on June 14, 2024

I see the issue now, I was initially opening to the folder and then opened the .sarif file. If I have a "blank" vs editor state and open the .sarif file only I repro the bug you mentioned.
Thank you, I'll look into the issue at hand.

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.