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 code snippet for old diagnostics #6507

Merged
merged 8 commits into from
Sep 29, 2024
Merged

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Sep 6, 2024

Description

This PR solves a small bug when calculating the code snippets of some diagnostics.

image

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@xunilrj xunilrj requested review from a team as code owners September 6, 2024 16:22
@xunilrj xunilrj self-assigned this Sep 6, 2024
IGI-111
IGI-111 previously approved these changes Sep 10, 2024
@IGI-111 IGI-111 requested review from sdankel and a team September 10, 2024 23:40
@alfiedotwtf
Copy link
Contributor

Just thinking, maybe a few simple tests that do the happy path and also bounds checks might be worth it so we don't introduce unwanted behaviour?

@xunilrj
Copy link
Contributor Author

xunilrj commented Sep 20, 2024

I have changed the algorithm to something easier to understand, more performant, given that we iterate the string only once, and I have also written more tests.

IGI-111
IGI-111 previously approved these changes Sep 23, 2024
@IGI-111 IGI-111 requested a review from a team September 24, 2024 08:57
JoshuaBatty
JoshuaBatty previously approved these changes Sep 24, 2024
@xunilrj xunilrj dismissed stale reviews from JoshuaBatty and IGI-111 via f1a28d3 September 24, 2024 11:57
@JoshuaBatty JoshuaBatty requested a review from a team September 25, 2024 00:29
@JoshuaBatty JoshuaBatty requested review from a team and IGI-111 September 25, 2024 00:29
@IGI-111 IGI-111 enabled auto-merge (squash) September 29, 2024 08:17
@IGI-111 IGI-111 merged commit 6ba98da into master Sep 29, 2024
39 checks passed
@IGI-111 IGI-111 deleted the xunilrj/fix-old-diag-snippet branch September 29, 2024 10:49
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.

5 participants