GithubHelp home page GithubHelp logo

Comments (9)

simmse avatar simmse commented on May 21, 2024

I have just tested with a web beta sarif validator. The outcome is exactly the same as this extension. I do not know from this result, whether the root cause is within the extension, Visual Studio, or the JSON based schema.

from sarif-visualstudio-extension.

 avatar commented on May 21, 2024

@simmse Can you share a SARIF file that gives you this error? It would be ideal if you had a sanitized (not containing any sensitive or confidential information) and minimal SARIF file that demonstrates the problem.

It would also help if I knew the exact compiler command line that produced the file.

Thanks!

P.S. The error message is from a runtime exception in the code. It's not referring to the name of a SARIF property; it's just a parameter name, from code like this:

public void DoSomethingToFile(string path)
{
    if (path == null) throw new ArgumentNullException(nameof(path));
    ...
}

It has nothing to do with the SARIF standard.

from sarif-visualstudio-extension.

simmse avatar simmse commented on May 21, 2024

@lgolding Perhaps something has been modified in the more recent 2019 Visual Studio (e.g. 16.1.4). When I open with File | Open, the editor area displays the file. I am not sure what is supposed to happen now. I can see the sarif (attached). Beyond that it is not clear what else is supposed to occur. The preview 2019 version I have is 16.1.0 Preview 2.0. Please remove the .txt ending to observe .sarif behavior. Remember that this originates from the demo sample by Microsoft.
annotations.nativecodeanalysis.sarif.txt

from sarif-visualstudio-extension.

 avatar commented on May 21, 2024

Ok, thank you for the repro file. I can reproduce your observation:

  1. I am running VS 2019 v16.1.4.

  2. I have installed the Microsoft SARIF Viewer extension, v2.1.3 (the latest).

image

  1. I removed the ".txt" extension from the file annotations.nativecodeanalysis.sarif.txt.

  2. In VS, I do File, Open and select annotations.nativecodeanalysis.sarif.

  3. The viewer notices that the sample file does not conform to the final, official version of SARIF (which is 2.1.0), and so it automatically translates the file to the latest version, and offers to save the transformed file. I said "No", but you can say "Yes" if you like:

image

  1. ... and it crashes:

image

I will debug this and provide a fix. Thanks!

from sarif-visualstudio-extension.

 avatar commented on May 21, 2024

@simmse Ok, I know what the trouble is. In the course of converting from the old to the new version, we aren't handling the empty helpUri values in the input file. (Strictly speaking, that makes the input file invalid, but no matter.)

@michaelcfanning FYI. Diagnosing this I found a couple of unrelated bugs in the PrereleaseCompatibilityTransformer (@simmse, that's the component in the SARIF SDK that translates old version to the most current.) I will fix all of this, publish a new SDK NuGet, then update the viewer to use the latest NuGet.

I'll take care of this tomorrow.

from sarif-visualstudio-extension.

 avatar commented on May 21, 2024

Well, the root cause wasn't what I thought it was. Still looking. The good news is, I got some nice unit tests out of it ;-)

from sarif-visualstudio-extension.

 avatar commented on May 21, 2024

No, that is the root cause! My test had a bug. Now the test correctly shows the problem. I'll stop the stream of consciousness now...

from sarif-visualstudio-extension.

 avatar commented on May 21, 2024

@simmse, This is fixed. I'll publish a new VSIX to the marketplace as soon as our build pipeline finishes producing a signed binary.

from sarif-visualstudio-extension.

 avatar commented on May 21, 2024

@simmse, version 2.1.4 of the SARIF Viewer extension for Visual Studio is now available on the marketplace. Please let me know if this solves your problem.

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.