Title: Keep an author-written argument table even when later columns are not of one kind · Issue #158 · openjavaformat/open-java-format · GitHub
Open Graph Title: Keep an author-written argument table even when later columns are not of one kind · Issue #158 · openjavaformat/open-java-format
X Title: Keep an author-written argument table even when later columns are not of one kind · Issue #158 · openjavaformat/open-java-format
Description: Upstream: palantir#1783 Kind: idea | Priority: low palantir-java-format#1783 (closed unmerged on 2026-10-17) notes that the tabular-arguments heuristic keeps a grid of arguments only if column 0 is uniform and every other column has a ma...
Open Graph Description: Upstream: palantir#1783 Kind: idea | Priority: low palantir-java-format#1783 (closed unmerged on 2026-10-17) notes that the tabular-arguments heuristic keeps a grid of arguments only if column 0 is...
X Description: Upstream: palantir#1783 Kind: idea | Priority: low palantir-java-format#1783 (closed unmerged on 2026-10-17) notes that the tabular-arguments heuristic keeps a grid of arguments only if column 0 is...
Opengraph URL: https://github.com/openjavaformat/open-java-format/issues/158
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Keep an author-written argument table even when later columns are not of one kind","articleBody":"**Upstream:** https://github.com/palantir/palantir-java-format/pull/1783 \n**Kind:** idea | **Priority:** low\n\n[palantir-java-format#1783](https://github.com/palantir/palantir-java-format/pull/1783) (closed unmerged on 2026-10-17) notes that the tabular-arguments heuristic keeps a grid of arguments only if column 0 is uniform and every other column has a majority of one expression kind. A values column mixing a sum, an identifier and a method call has no majority, so the grid collapses onto one line, while an almost identical call with uniform values keeps its table. The PR drops the check for columns after the first; column 0 and all row-length and start-column rules stay. The only existing golden that changes is the paired-arguments test.\n\nWhy it matters to us: we have the same two checks in `argumentsAreTabular` (around lines 3366-3370 of `JavaInputAstVisitor`), so identical inputs give inconsistent results today. It only ever keeps a table the author already wrote, so risk is low, but it changes an existing golden file and diverges from palantir.\n\nAffected files: `open-java-format/src/main/java/com/palantir/javaformat/java/JavaInputAstVisitor.java`, the PairedArguments test data.\n\n**Before** (upstream behaviour before the change; our code has the same check, not run):\n```java\nassertThat(\"alpha\", first + second, \"bravo\", someVariable, \"charlie\", compute(), \"delta\", other + thing);\n```\n**After** (with the change, input written as a grid):\n```java\nassertThat(\n \"alpha\", first + second,\n \"bravo\", someVariable,\n \"charlie\", compute(),\n \"delta\", other + thing);\n```\n\nSuggested action: adopt-the-idea if we want consistent table handling; low priority.\n\n---\n_Filed from an upstream-watch ticket after manual review._","author":{"url":"https://github.com/abashev","@type":"Person","name":"abashev"},"datePublished":"2026-10-25T19:20:30Z","url":"https://github.com/openjavaformat/open-java-format/issues/158"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fc8e2b4e-c800-7e3c-b4ed-69d6fd5affb6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D76C:6E551:2CDA50:3B0ADA:6AFBB795 |
| html-safe-nonce | ad7d1c7f2cc385020aa010eab198ecfe30fb9d4ff5409035a3c362113eab61b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzZDOjZFNTUxOjJDREE1MDozQjBBREE6NkFGQkI3OTUiLCJ2aXNpdG9yX2lkIjoiNzc0MzE5MjkzMTUwNzcxMDkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cc0d7d933377c45386b6845a89629ec974c443f04cb889ca73bff5c5dd4816c3 |
| hovercard-subject-tag | issue:6028305723 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openjavaformat/open-java-format/158/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1d870012ae7af07e28fb356b3754a9759239348d109ce651b03935095c84679e/openjavaformat/open-java-format/issues/158 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1d870012ae7af07e28fb356b3754a9759239348d109ce651b03935095c84679e/openjavaformat/open-java-format/issues/158 |
| og:image:alt | Upstream: palantir#1783 Kind: idea | Priority: low palantir-java-format#1783 (closed unmerged on 2026-10-17) notes that the tabular-arguments heuristic keeps a grid of arguments only if column 0 is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abashev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/openjavaformat/open-java-format git https://github.com/openjavaformat/open-java-format.git |
| octolytics-dimension-user_id | 325177626 |
| octolytics-dimension-user_login | openjavaformat |
| octolytics-dimension-repository_id | 1288055459 |
| octolytics-dimension-repository_nwo | openjavaformat/open-java-format |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 214273098 |
| octolytics-dimension-repository_parent_nwo | palantir/palantir-java-format |
| octolytics-dimension-repository_network_root_id | 214273098 |
| octolytics-dimension-repository_network_root_nwo | palantir/palantir-java-format |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width