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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: code action for OSS via LS in IntelliJ [IDE-284] #530

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

teodora-sandu
Copy link
Contributor

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

Description

This PR enhances the existing codeActions returned via the LS for OSS with quickfix actions that tell us what version to upgrade a package to.

The only difference is that the new "OSS via LS" code actions have Snyk Learn actions too and we return quickfix code actions for all possible upgrade paths, rather than just the one.

To review, build snyk/snyk-ls#511 and follow the review instructions there.

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

This was tested by building snyk-ls from snyk/snyk-ls#511 and then the CLI with a snyk-ls replace directive, then changing the IntelliJ sandbox generated from this branch to point at the local CLI. Make sure to enable the registry flag.

The tests were run on https://github.com/snyk-labs/snyk-chat-goof.

Before:
Screenshot 2024-05-15 at 10 15 25
Screenshot 2024-05-15 at 10 15 34
Screenshot 2024-05-15 at 10 15 39
Screenshot 2024-05-15 at 10 15 43
Screenshot 2024-05-15 at 10 15 48
Screenshot 2024-05-15 at 10 15 51

After:

Screenshot 2024-05-16 at 16 56 59 Screenshot 2024-05-16 at 16 57 04 Screenshot 2024-05-16 at 16 57 09 Screenshot 2024-05-16 at 16 57 15 Screenshot 2024-05-16 at 16 57 20 Screenshot 2024-05-16 at 16 57 38 Screenshot 2024-05-16 at 16 57 41

@teodora-sandu teodora-sandu requested a review from a team as a code owner May 16, 2024 16:05
@teodora-sandu teodora-sandu marked this pull request as draft May 16, 2024 16:05
@teodora-sandu teodora-sandu force-pushed the feat/code-action-oss-ls branch 2 times, most recently from b52bb80 to 0e2788b Compare June 25, 2024 13:29
@teodora-sandu teodora-sandu marked this pull request as ready for review June 25, 2024 15:50
Copy link
Collaborator

@bastiandoetsch bastiandoetsch left a comment

Choose a reason for hiding this comment

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

I suppose there is a corresponding PR that adds it to LS?

@teodora-sandu
Copy link
Contributor Author

Yep @bastiandoetsch it's linked in the PR description too but here it is: snyk/snyk-ls#511. I'll wait to get that merged and released before I merge this PR

@bastiandoetsch
Copy link
Collaborator

The LS change is merged 馃殌

@teodora-sandu
Copy link
Contributor Author

Just need to get snyk/cli#5349 merged and then this can be merged!

@teodora-sandu teodora-sandu enabled auto-merge (squash) July 8, 2024 08:05
@teodora-sandu teodora-sandu merged commit 68f330e into master Jul 8, 2024
3 of 8 checks passed
@teodora-sandu teodora-sandu deleted the feat/code-action-oss-ls branch July 8, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants