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

fix: trigger scan on startup for non-code #513

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

teodora-sandu
Copy link
Contributor

@teodora-sandu teodora-sandu commented Apr 16, 2024

Description

When I implemented #510 I didn't realise that the LS actually has logic for scanning on startup. So because of that, we end up triggering multiple code scans and ending up in a loop because https://github.com/snyk/snyk-intellij-plugin/blob/5282559023d2d1987bd893ea78f1df585ff553e9/src/main/kotlin/io/snyk/plugin/services/SnykTaskQueueService.kt ends up saving the docs and then triggering another scan for Snyk Code.

The fix involves only triggering scan for non-Snyk Code when in LS on start-up. I've refactored the code a bit so that we are preparing ourselves for when we enable OSS and IaC in LS too for IntelliJ.

Checklist

  • Tests added and all succeed
  • Linted
  • CHANGELOG.md updated
  • README.md updated, if user-facing

@teodora-sandu teodora-sandu force-pushed the fix/scan-on-save-ls branch 3 times, most recently from 84be785 to 4ba0e89 Compare April 17, 2024 15:33
@teodora-sandu teodora-sandu marked this pull request as ready for review April 17, 2024 15:33
@teodora-sandu teodora-sandu requested a review from a team as a code owner April 17, 2024 15:33
@teodora-sandu teodora-sandu force-pushed the fix/scan-on-save-ls branch 2 times, most recently from 0ffb165 to c9b8002 Compare April 18, 2024 11:32
@teodora-sandu teodora-sandu merged commit eefaa7e into master Apr 18, 2024
9 checks passed
@teodora-sandu teodora-sandu deleted the fix/scan-on-save-ls branch April 18, 2024 13:01
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