Skip to content
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

Add SARIF result comparison to compare view #3113

Merged
merged 5 commits into from
Dec 15, 2023

Conversation

koesie10
Copy link
Member

@koesie10 koesie10 commented Dec 6, 2023

This adds diffing of SARIF results to the compare view. It naively compares the JSON.stringify of the SARIF results and doesn't do anything smart about differing paths etc.

It's easiest to review this commit-by-commit.

Screenshot 2023-12-14 at 10 27 25

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@koesie10 koesie10 force-pushed the koesie10/compare-sarif-view branch 2 times, most recently from c759af1 to 49114cc Compare December 7, 2023 09:56
@koesie10 koesie10 force-pushed the koesie10/compare-interpreted branch from fc9430d to a44f9ac Compare December 7, 2023 10:07
Base automatically changed from koesie10/compare-sarif-view to main December 14, 2023 09:10
This adds the `alerts` result set to the compare view if an interpreted
result is available. This assumes that the user has opened the query
in the results view before opening the compare view. It will not
interpret the results if the interpreted results are not available.
This moves reading of the result sets to the `compareResults` method
since raw result sets don't need to be read for interpreted results and
the `findResultSetsToCompare` method is shared between the two types
of results.
This wires up the comparison of SARIF results in the compare view. It
uses the same diffing algorithm as the raw results, but it uses the
SARIF results instead of the raw results.
@koesie10 koesie10 force-pushed the koesie10/compare-interpreted branch from a44f9ac to d4a4536 Compare December 14, 2023 09:25
@koesie10 koesie10 marked this pull request as ready for review December 14, 2023 09:40
@koesie10 koesie10 requested a review from a team as a code owner December 14, 2023 09:40
Copy link
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't say I'm very deeply following all the code changes as I'm not super familiar with the area but it all seems to make sense.

@koesie10 koesie10 merged commit 60d777a into main Dec 15, 2023
25 checks passed
@koesie10 koesie10 deleted the koesie10/compare-interpreted branch December 15, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants