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

Provided multiple quick fix options for variable modification #1117

Conversation

shashank-iitbhu
Copy link
Contributor

1. Does this PR affect any open issues?(Y/N) and add issue references :

  • N
  • Y

fix #1113

2. What is the scope of this PR (e.g. component or file name):

changes to multiple files

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

Screen.Recording.2024-03-08.at.8.20.29.AM.mov
  • Modified the Message struct from Option<String> to Option<Vec<String>>.
  • Due to this I had to replace arguments which were passed to suggested_replacement field of Message struct.
  • In to_lsp.rs, now the suggested_replacement key of the data field of Diagnostics is mapped to a vector of strings.
  • extract_suggested_replacements function in quick_fix.rs now returns a vector of replacement texts.
  • Code Action for CompileError is iterated for each element of replacement_texts vector.
  • Now we get multiple quick fix options for variable modification.
  • Handled all the failing tests.

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

Signed-off-by: Shashank Mittal <shashank.mittal.mec22@itbhu.ac.in>
Signed-off-by: Shashank Mittal <shashank.mittal.mec22@itbhu.ac.in>
Signed-off-by: Shashank Mittal <shashank.mittal.mec22@itbhu.ac.in>
@coveralls
Copy link
Collaborator

coveralls commented Mar 8, 2024

Pull Request Test Coverage Report for Build 8198199663

Details

  • 34 of 55 (61.82%) changed or added relevant lines in 7 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.004%) to 71.752%

Changes Missing Coverage Covered Lines Changed/Added Lines %
kclvm/tools/src/LSP/src/quick_fix.rs 0 21 0.0%
Files with Coverage Reduction New Missed Lines %
kclvm/tools/src/LSP/src/quick_fix.rs 2 51.89%
Totals Coverage Status
Change from base Build 8187055617: 0.004%
Covered Lines: 44581
Relevant Lines: 62132

💛 - Coveralls

@Peefy Peefy added this to the v0.9.0 Release milestone Mar 8, 2024
@Peefy
Copy link
Contributor

Peefy commented Mar 8, 2024

Amazing Job! LGTM!

@Peefy Peefy merged commit f11ddd4 into kcl-lang:main Mar 8, 2024
8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LFX] Provide multiple quick fix options for variable modification in KCL IDE
3 participants