Skip to content

feat(map-format): format key-value pairs to be inline - #1731

Open
ranpy13 wants to merge 2 commits into
palantir:developfrom
ranpy13:ran/fix/inline-map-entries
Open

feat(map-format): format key-value pairs to be inline#1731
ranpy13 wants to merge 2 commits into
palantir:developfrom
ranpy13:ran/fix/inline-map-entries

Conversation

@ranpy13

@ranpy13 ranpy13 commented Aug 1, 2026

Copy link
Copy Markdown

Before this PR

the static factory methods for Map and ImmutableMaps are treated as regular methods, where each argument is expected to be in a new line. But for these methods, it makes more sense to have the key-value pairs inline, for better readability and context.

After this PR

the key-value pairs of Map factory method will be in the same line, allowing for better readability.

Possible downsides?

previously correctly formatted files will now show up as failing formatting checks and can potentially create a big diff across a lot of files.

closes: #1602

@palantirtech

Copy link
Copy Markdown
Member

Thanks for your interest in palantir/palantir-java-format, @ranpy13! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@changelog-app

changelog-app Bot commented Aug 1, 2026

Copy link
Copy Markdown

Generate changelog in changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

feat(map-format): format key-value pairs to be inline

Check the box to generate changelog(s)

  • Generate changelog entry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Map.of() and ImmutableMap.of() more readable

2 participants