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

Fix: Limit dotted chains for expressions starting with complex expression #71

Merged
merged 3 commits into from
Nov 12, 2019

Conversation

dansanduleac
Copy link
Contributor

@dansanduleac dansanduleac commented Nov 12, 2019

Before this PR

#70 didn't address all cases of method chains.

Specifically, cases where the dotted chain started with a constructor or a complex expression rather than a field / method call.

After this PR

==COMMIT_MSG==
Limit dotted chains for expressions starting with a complex expression such as a parenthesized expression or a constructor.
==COMMIT_MSG==

Possible downsides?

@dansanduleac dansanduleac requested a review from ferozco November 12, 2019 20:51
@dansanduleac dansanduleac changed the title Fix: Limit dotted chains for expressions starting with constructor Fix: Limit dotted chains for expressions starting with complex expression Nov 12, 2019
@dansanduleac
Copy link
Contributor Author

Verified this makes positive changes in the conjure-java-runtime PR.

@bulldozer-bot bulldozer-bot bot merged commit e86d8b3 into develop Nov 12, 2019
@bulldozer-bot bulldozer-bot bot deleted the ds/dotted-chains-2 branch November 12, 2019 21:07
@svc-autorelease
Copy link
Collaborator

Released 0.3.2

bulldozer-bot bot pushed a commit that referenced this pull request Nov 27, 2019
When inlining a level's leading docs, check that no breaks were introduced more robustly.

We already did some validation that the leading docs 
 (1) don't contain forced breaks, and
 (2) can fit onto the current line
However with the new logic added in #71, inner levels might decide to break even when the above two conditions are satisfied.

We guard against this by checking whether the state after the inlining of leading docs has recorded new lines, which would be caused by an inner break being taken.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants