-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
The formatter should avoid converting if/else into ternary if the the resulting line would be too long. I think stree should disregard the configured print-width and use regular if/else when the line length of the ternary exceeds ~60 chars.
Original (easy to read):
if fits_into_octal?(value, length)
to_octal(value, length)
else
to_base256(value, length)
endFormatted with stree (harder to read):
fits_into_octal?(value, length) ? to_octal(value, length) : to_base256(value, length)(Tested with print-width of 100)
davidtaylorhq
Metadata
Metadata
Assignees
Labels
No labels