Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing parens of function returning a closure put onto wrong line #14

Open
DivineDominion opened this issue Jul 8, 2022 · 1 comment

Comments

@DivineDominion
Copy link

Played around with Multiliner a bit :)

Given this input:

func applyContentActions(action: AppAction, reducers: [TableActionReducer]) -> (_ documentState: DocumentState) -> DocumentState {
    ...
}

I expected somewhat along these lines::

func applyContentActions(
    action: AppAction,
    reducers: [TableActionReducer]
) -> (_ documentState: DocumentState) -> DocumentState {
    ...
}

Actual output did try to put the parens and the arrow onto a new line, but not the first occurrence:

func applyContentActions(
    action: AppAction,
    reducers: [TableActionReducer]) -> (_ documentState: DocumentState
) -> DocumentState {
    ...
}
@aheze
Copy link
Owner

aheze commented Jul 8, 2022

Yeah, the formatting script is kind of dumb right now, it just checks for the first and last occurrence of the parentheses and splits the content within that. Something smarter would help #3 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants