Skip to content

Amazon Q[ACR]: fixing the line number on document change #4534

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

Merged
merged 9 commits into from
Jun 3, 2024

Conversation

laileni-aws
Copy link
Contributor

@laileni-aws laileni-aws commented May 30, 2024

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Problem

  1. Line numbers of suggested fixes can be out of sync if the document changes.
  2. Line offset calculation is incorrect in some cases.
  3. Document listener is triggered multiple times for a single character change.

Solution

  1. Add line offset to suggested fix code during document changes using regex replace
  2. Removing redundant document listener as this is triggering the documentChange multiple times.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@laileni-aws laileni-aws marked this pull request as ready for review May 31, 2024 02:41
@laileni-aws laileni-aws requested review from a team as code owners May 31, 2024 02:41
@laileni-aws laileni-aws requested a review from ctlai95 May 31, 2024 17:21
Copy link

sonarqubecloud bot commented Jun 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.2% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@ashishrp-aws ashishrp-aws left a comment

Choose a reason for hiding this comment

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

We can't remove multicaster. I fixed the issue with multicaster.

@laileni-aws laileni-aws requested a review from ashishrp-aws June 1, 2024 01:19
@laileni-aws laileni-aws merged commit 72af075 into aws:main Jun 3, 2024
9 of 11 checks passed
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