-
Notifications
You must be signed in to change notification settings - Fork 226
Use sarif parser for reopened results #1457
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
Changes from 1 commit
c13319d
b3d7e78
c37c5bf
f0d0017
c5a816d
c1b3ee1
2b6dd6b
169a88a
fc32971
ca8f930
8c92a19
438607d
a07e549
9fe8fd8
d656db0
dcc51cc
badbed9
6bd649a
05c6efe
f75f0b7
f7dc7b7
50b3109
fbe0b98
93bd94c
86eaf9d
b849fa9
262fbee
75c8aa3
f37bf65
ca0c863
671f0e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ import { | |
| import { DatabaseInfo } from './pure/interface-types'; | ||
| import { QueryStatus } from './query-status'; | ||
| import { RemoteQueryHistoryItem } from './remote-queries/remote-query-history-item'; | ||
| import { sarifParser } from './sarif-parser'; | ||
|
|
||
| /** | ||
| * query-results.ts | ||
|
|
@@ -160,10 +161,12 @@ export async function interpretResultsSarif( | |
| sourceInfo?: cli.SourceInfo | ||
| ): Promise<SarifInterpretationData> { | ||
| const { resultsPath, interpretedResultsPath } = resultsPaths; | ||
| let res; | ||
| if (await fs.pathExists(interpretedResultsPath)) { | ||
| return { ...JSON.parse(await fs.readFile(interpretedResultsPath, 'utf8')), t: 'SarifInterpretationData' }; | ||
| res = await sarifParser(interpretedResultsPath); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a thought....if this function throws an error because the file is not parseable, should we delete the file and re-run Possibly, we can do this as a followup.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, that's a good point 👍 I'll leave this comment up for now, while we work out the last invalid SARIF test issue.. |
||
| } else { | ||
| res = await cli.interpretBqrsSarif(ensureMetadataIsComplete(metadata), resultsPath, interpretedResultsPath, sourceInfo); | ||
| } | ||
| const res = await cli.interpretBqrsSarif(ensureMetadataIsComplete(metadata), resultsPath, interpretedResultsPath, sourceInfo); | ||
| return { ...res, t: 'SarifInterpretationData' }; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.