Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_diagnostics): fix the printing of empty diff lines #3382

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

leops
Copy link
Contributor

@leops leops commented Oct 10, 2022

Summary

Fixes #3375

This PR fixes a bug that was causing empty inserted or deleted lines to not be displayed by the diff printing logic. Due to the line-based model used to render diffs those lines were considered to have no content, but they should now be properly accounted for.

Test Plan

I've added new test cases to check the insertion and deletion of one or many empty lines are all correctly displayed by the diff printer. I've also updated a few snapshots that were affected by this issue

@leops leops requested a review from xunilrj as a code owner October 10, 2022 14:51
@leops leops requested a review from a team October 10, 2022 14:51
@leops leops temporarily deployed to netlify-playground October 10, 2022 14:51 Inactive
@netlify
Copy link

netlify bot commented Oct 10, 2022

Deploy Preview for rometools ready!

Name Link
🔨 Latest commit 01032a0
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/63443186a430c90008446874
😎 Deploy Preview https://deploy-preview-3382--rometools.netlify.app/docs/lint/rules/noshoutyconstants
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Much better!

@ematipico ematipico added this to the 10.0.0 milestone Oct 10, 2022
@ematipico ematipico added the A-Diagnostic Area: errors and diagnostics label Oct 10, 2022
@leops leops merged commit f92fd06 into main Oct 11, 2022
@leops leops deleted the fix/diff-empty-line branch October 11, 2022 07:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Diagnostic Area: errors and diagnostics
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🐛 new line only formatter diff
2 participants