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

Hard to read long method chains #69

Closed
dansanduleac opened this issue Nov 12, 2019 · 0 comments · Fixed by #70
Closed

Hard to read long method chains #69

dansanduleac opened this issue Nov 12, 2019 · 0 comments · Fixed by #70
Labels
enhancement New feature or request

Comments

@dansanduleac
Copy link
Contributor

What happened?

https://github.com/palantir/conjure-java-runtime/pull/1285/files#diff-3d840aee82ecd3ad6d02f77a1bdd0239L56

Human-authored:

return new Response.Builder()    
        .request(request)    
        .protocol(Protocol.HTTP_1_1)    
        .code(code)    
        .message("unused")    
        .build();

PJF:

return new Response.Builder().request(request).protocol(Protocol.HTTP_1_1).code(code).message("unused").build();

What did you want to happen?

Don't allow method chains to extend too far to the right.

We should probably limit the absolute column past which method chain .s are not allowed anymore to something more sensible than 120, like 80.

@dansanduleac dansanduleac added the enhancement New feature or request label Nov 12, 2019
bulldozer-bot bot pushed a commit that referenced this issue Nov 12, 2019
Limit how far dots may appear in long method chains to 80 chars.

Note that this doesn't currently apply to prefixes (such as `foo.bar().baz().stream()`) because prefixes are also used to group together fully qualified class names and it's a bit trickier to handle that case.

Fixes #69.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant