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

feat: delta for code scan [IDE-448] #553

Merged
merged 53 commits into from
Jul 10, 2024
Merged

feat: delta for code scan [IDE-448] #553

merged 53 commits into from
Jul 10, 2024

Conversation

ShawkyZ
Copy link
Contributor

@ShawkyZ ShawkyZ commented Jun 19, 2024

Description

This PR adds the following:

  • delta package that introduces a flow for calculating deltas. Entrypoint is: delta_finder.go
  • delta_finder has two public methods. Enrich (for enriching current analysis results with the IsNew flag).
    Diff: For returning only the diff between current branch analysis vs base branch analysis.
  • delta_finder relies on: Enricher, Differ and Matcher. Differ for determining the diff between two scan results. Matcher for matching two issue types and Enricher for enriching results if necessary with Ids or IsNew.
  • Matcher implementation for matching code analysis results bases on the implementation of (code-issue-identity) https://github.com/snyk/code-issue-identity
  • new settings option enableSnykDelta.
  • Initial version of cloning base branch and scanning it (There will be followup PR for caching results)
  • Base branch choice is hardcoded (Follow-up PR for base scan option persisting/loading)

Current scan flow should work as before if the option enableDeltaFindings is not set.

Checklist

  • Tests added and all succeed
  • Linted
  • README.md updated, if user-facing
  • License file updated, if new 3rd-party dependency is introduced

🚨After having merged, please update the CLI go.mod to pull in latest language server.

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

@ShawkyZ ShawkyZ merged commit b61e6b8 into main Jul 10, 2024
14 of 15 checks passed
@ShawkyZ ShawkyZ deleted the feat/delta branch July 10, 2024 15:50
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.

4 participants