-
Notifications
You must be signed in to change notification settings - Fork 202
Allow viewing SARIF from query history view #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a huge deal to keep the function synchronous since file existence is a quick operation, but generally a good idea.
// Mark this query history item according to whether it has a | ||
// SARIF file so that we can make context menu items conditionally | ||
// available. | ||
it.contextValue = element.query.hasInterpretedResults() ? 'interpretedResultsItem' : 'rawResultsItem'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat.
* Holds if this query actually has produced interpreted results. | ||
*/ | ||
hasInterpretedResults(): boolean { | ||
return fs.existsSync(this.resultsPaths.interpretedResultsPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this function async? Otherwise, this is blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I was afraid the getTreeItem
had to be synchronous, but it looks like vscode permits it to return a Promise
. Happy to make it async
then.
And looks like the unit tests caught a legitimate issue that would have been hard to find otherwise. Nice. :) |
Ah, right, I did leave out the command palette exclusion to see if it would trigger that, then promptly forgot that I had done so. Thankfully, unit tests don't forget :) |
Addresses the SARIF part of #342. Could still use CSV export.
@github/product-docs-dsp
any need for docs for this?