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

Don't always break at method calls with prefix #94

Merged
merged 18 commits into from
Dec 4, 2019

Conversation

dansanduleac
Copy link
Contributor

Before this PR

We were allowing the inlining logic to stop (accept an inlining) whenever the last "level" (in most cases, argument to a method call) was a dotted construction (like a method call chain) that contains a prefix which PJF would want to keep on one line (SafeArg.of being the most prevalent case of this).

This would cause degenerate formattings like:

Preconditions.checkArgument(
        hostPortString.charAt(0) == '[', "Bracketed host-port string must start with a bracket", SafeArg.of(
                "port", hostPortString));

After this PR

==COMMIT_MSG==
Stop indiscriminately stopping an inlining at method calls like SafeArg.of.
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Dec 4, 2019

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Stop indiscriminately stopping an inlining at method calls like SafeArg.of.

Check the box to generate changelog(s)

  • Generate changelog entry

@iamdanfox
Copy link
Contributor

Shall we do a preview on c-j-r and see what we get??

Preconditions.checkArgument(
hostPortString.charAt(0) == '[',
"Bracketed host-port string must start with a bracket",
SafeArg.of("port", hostPortString));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤩

dansanduleac added a commit to palantir/conjure-java-runtime that referenced this pull request Dec 4, 2019
@dansanduleac
Copy link
Contributor Author

Example changes compared to 0.3.2:
palantir/conjure-java-runtime@b5d6f00

@bulldozer-bot bulldozer-bot bot merged commit ed967fc into develop Dec 4, 2019
@bulldozer-bot bulldozer-bot bot deleted the ds/dont-inline-prefixes branch December 4, 2019 17:41
@svc-autorelease
Copy link
Collaborator

Released 0.3.4

@iamdanfox
Copy link
Contributor

@dansanduleac would you mind picking this up in gradle-baseline and getting a release of that out too pls?

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