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

fix(rome_js_formatter): breaking logic for member chains #2800

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

ematipico
Copy link
Contributor

Summary

This PR adds again a check on the breaking logic of the member chain. The check is around comments. I also fixed the previous logic, where the check for certain comments was incorrectly done.

Test Plan

cargo test and checked that snapshots are correctly updated

PR
File Based Average Prettier Similarity: 77.33%
Line Based Average Prettier Similarity: 72.59%

main
File Based Average Prettier Similarity: 77.25%
Line Based Average Prettier Similarity: 72.45%

@ematipico ematipico temporarily deployed to aws June 30, 2022 14:26 Inactive
@ematipico ematipico requested review from yassere and leops June 30, 2022 14:26
@ematipico ematipico force-pushed the feature/member-chain-best-fitting branch from 4fc49f1 to 1d167d9 Compare June 30, 2022 14:29
@cloudflare-pages
Copy link

cloudflare-pages bot commented Jun 30, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1d167d9
Status: ✅  Deploy successful!
Preview URL: https://99250226.tools-8rn.pages.dev
Branch Preview URL: https://feature-member-chain-best-fi.tools-8rn.pages.dev

View logs

@ematipico ematipico temporarily deployed to aws June 30, 2022 14:29 Inactive
@github-actions
Copy link

github-actions bot commented Jun 30, 2022

@@ -90,7 +93,50 @@ impl Groups {
let call_expressions_are_not_simple =
calls_count > 2 && self.call_expressions_are_not_simple()?;

Ok(call_expressions_are_not_simple)
// TODO: add here will_break logic
Copy link
Contributor

Choose a reason for hiding this comment

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

What exactly is this todo here about ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A reminder for me to add more logic here. The logic should decide to break the group if some member of the chain will break. I decided to have a TODO here because it's not a small implementation and it requires its own PR.

@ematipico ematipico merged commit 799325b into main Jul 1, 2022
@ematipico ematipico deleted the feature/member-chain-best-fitting branch July 1, 2022 12:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants