You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dale Emery (JIRA)" <ji...@apache.org> on 2018/05/25 21:21:00 UTC

[jira] [Closed] (GEODE-5254) Configure spotless to allow line breaks in method chains (and elsewhere)

     [ https://issues.apache.org/jira/browse/GEODE-5254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dale Emery closed GEODE-5254.
-----------------------------

> Configure spotless to allow line breaks in method chains (and elsewhere)
> ------------------------------------------------------------------------
>
>                 Key: GEODE-5254
>                 URL: https://issues.apache.org/jira/browse/GEODE-5254
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Dale Emery
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Spotless sometimes joins consecutive lines in a way that makes the code less readable.
> For some constructs, such as "fluent" method chains on Streams, Mocks, and AssertJ assertions, the code is much more readable if the chained methods can be aligned vertically, one per line, rather than being joined to fill lines.
> Spotless's current behavior is configured by this setting in etc/eclipse-java-google-style.xml:
> {code:java}
> <setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>{code}
> Changing this value to {{false}} would instruct spotless/eclipse *not* to join already-wrapped lines.
> Changing this setting will not alter any existing code. It will instruct spotless/eclipse to *refrain* from joining lines in the future.
> Note that changing this setting would cause spotless/eclipse to refrain from joining *any* already-wrapped lines, not just lines in method chains. I have been unable to find a more context-sensitive setting that refrains from joining lines only in method chains.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)