Add formatting fixes for chained functions and big arrays.#12
Merged
Conversation
Owner
|
Thank you for this PR. I'm just unsure of the last commit, I liked the solution of @ManuLinares, that allowed to have an user defined formatting, which imo yield better results. On the one hand your solution enforces the same logic on every cases, but on the other hand I think it looks worse. |
Contributor
Author
|
@lmichaudel I removed the array formatter edit. Currently the formatter breaks the array, in some cases, so each item get's line-break. |
Owner
|
I suspect it's because it was previously formatted with an older version of c3fmt. e.g. : ushort[] indices = {
12, 13, 14, 12, 14, 15, // bottom
16, 17, 18, 16, 18, 19, // right
20, 21, 22, 20, 22, 23 // left
};If you still want to tackle this, I suggest you open another PR, for the moment I'll merge this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve the formatting of functions like these, they wont break on param's anymore.
And long arrays, wont break on every item, and will respect the max-width.