I know that you and I aren't the only ones who disliked how spotless
disrupted method chains.

Since it won't recognize chain vs non-chain context, we as developers will
need to be more cognizant of this in general.  But I still think it's a
good tradeoff.

On Thu, May 24, 2018 at 5:14 PM, Dale Emery <dem...@pivotal.io> wrote:

> Hi all,
>
> I've submitted a PR to configure Spotless to refrain from joining
> already-wrapped lines:
> https://github.com/apache/geode/pull/1994 <https://github.com/apache/
> geode/pull/1994>
>
> My main motivation was to allow formatting method chains with one method
> per line (such as in long Stream pipelines, Mock configurations, and
> AssertJ assertions) when that would make the code easier to understand.
>
> The change in my PR goes further than that. It causes Spotless not to join
> any lines if they are already shorter than the line length limit. I could
> not find an easy way to prevent joining lines only in method chains.
>
> Comments?
>
> Dale
>
> —
> Dale Emery
> dem...@pivotal.io
>
>

Reply via email to