Dale Emery created GEODE-5254:
---------------------------------
Summary: 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
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)