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

Conversation

MichaReiser
Copy link
Contributor

Summary

This PR re-visits the formatting of loops. I verified that Rome generates the same IR (except for comments).

I tried to match the same formatting for the semicolon's leading comments of continue and break statements but wasn't able to match the behaviour without

a) adding a serious amount of complexity
b) get a stable format.

That's why I left the "default" comments formatting in place.

Test Plan

Verified the updated snapshots.

@MichaReiser MichaReiser temporarily deployed to aws July 29, 2022 14:49 Inactive
@MichaReiser MichaReiser changed the base branch from main to test/prettier-tests July 29, 2022 14:49
@MichaReiser MichaReiser force-pushed the test/prettier-tests branch from afcf2c3 to e307116 Compare July 29, 2022 14:50
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 29, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 62b84d5
Status: ✅  Deploy successful!
Preview URL: https://af4ec45b.tools-8rn.pages.dev
Branch Preview URL: https://feat-format-loops.tools-8rn.pages.dev

View logs

@github-actions
Copy link

github-actions bot commented Jul 29, 2022

Base automatically changed from test/prettier-tests to main July 29, 2022 15:09
@MichaReiser MichaReiser temporarily deployed to aws July 29, 2022 16:37 Inactive
@MichaReiser MichaReiser marked this pull request as ready for review July 29, 2022 16:38
@MichaReiser MichaReiser requested a review from ematipico as a code owner July 29, 2022 16:38
@ematipico
Copy link
Contributor

Could you add the metrics please?

@MichaReiser
Copy link
Contributor Author

Could you add the metrics please?

File Based Average Prettier Similarity: 77.98% -> 77.97%
Line Based Average Prettier Similarity: 73.23% => 73.11%

My understanding of this small regression is that it is mainly coming from how we format comments. I wouldn't give this too much weight for now as we are aware that this is an open issue and requires more fundamental architecture changes

@MichaReiser MichaReiser temporarily deployed to aws August 2, 2022 09:38 Inactive
@MichaReiser MichaReiser temporarily deployed to aws August 2, 2022 13:28 Inactive
@MichaReiser MichaReiser merged commit 008143e into main Aug 3, 2022
@MichaReiser MichaReiser deleted the feat/format-loops branch August 3, 2022 06:54
@ematipico ematipico added this to the 0.9.0 milestone Aug 3, 2022
IWANABETHATGUY pushed a commit to IWANABETHATGUY/tools that referenced this pull request Aug 22, 2022
@ematipico ematipico added the A-Formatter Area: formatter label Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-Formatter Area: formatter

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载