-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
For most chained methods, the new chain-split-dots behavior makes sense. But there are a few types where it doesn't. For instance, we have this code:
suite.Assert().Equal("some long string", myvar)
golines reformats it like this:
suite.Assert()
.Equal("some long string", myvar)
whereas the more natural reformatting would be:
suite.Assert().Equal(
"some long string",
myvar,
)
The heuristic in my head is: if all parts of the chain fit on one line, except for the arguments to the last function in the chain, treat it like a single function call rather than a chained function call.
So this is a feature request: to add another option (besides chain-split-dots and no-chain-split-dots) that could implement that heuristic. I'd also be ok with just changing the behavior of chain-split-dots to match that heuristic, but it may be too invasive for existing users...
themartorana and oneart-dev
Metadata
Metadata
Assignees
Labels
No labels