movebit / movefmt

Other
5 stars 4 forks source link

Wrap booleans at `||` or `&&` and not at `==` #12

Closed BriungRi closed 5 months ago

BriungRi commented 5 months ago

I think it is much more readable to wrap at a boolean operator like "or" or "and" because each argument I can evaluate for true or false individually. Whereas for ==, I like to have both sides of the argument in context when reading for equality, so it is nicer to keep this on the same line when possible.

Screenshot 2024-06-10 at 9 13 26 AM

robinlzw commented 5 months ago

We will optimize this area, thank you for your discovery.

robinlzw commented 5 months ago

We have added a test case for this issue here(https://github.com/movebit/movefmt/commit/8193e9f3423c240a7f59581b670380c1cdc9a87f) and found that after testing, the problem you reported does not exist. Furthermore, we have identified a similar scenario in the existing cases that is also handled correctly, which you can refer to here.