docs: stop prettier table re-alignment churn in expressions.md#4583
Merged
Conversation
prettier re-aligns markdown table columns to the widest cell, so adding a single expression row rewrites every row in the table. That produces noisy diffs and frequent merge conflicts between PRs that each add new expressions. Exempt the file from prettier so future additions stay as one-line diffs.
With prettier no longer aligning the tables, collapse the existing column padding so that adding an expression row never shifts the other rows. Combined with the prettier exemption, every future addition is a true one-line diff that cannot collide on re-alignment.
The Apache RAT license check rejects .prettierignore for missing a license header, failing the Preflight CI job. Add the standard ASF header in shell-comment style.
3c113e5 to
fe8b5ff
Compare
mbutrovich
approved these changes
Jun 3, 2026
Contributor
mbutrovich
left a comment
There was a problem hiding this comment.
Thanks @andygrove. So what's the workflow going forward for this file? Run prettier on it at release or something just to get it back into conformity?
Member
Author
The short term answer:
The long term answer:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A. This is a documentation/tooling change to reduce contributor friction.
Rationale for this change
docs/source/user-guide/latest/expressions.mdis hand-edited by nearly every PR that adds or updates a Spark expression. The tables are formatted by prettier, which aligns each column to its widest cell. Adding a single row whoseNotes(or any) cell is wider than the current column re-pads every other row in that table. The result is large, noisy diffs and frequent merge conflicts between concurrent expression PRs that each touch the same table.What changes are included in this PR?
.prettierignorethat exemptsdocs/source/user-guide/latest/expressions.md. The file is almost entirely tables, and prettier's markdown prose handling is whitespace-only (proseWrapdefaults topreserve), so exempting the whole file costs nothing for the surrounding prose while stopping the column re-padding.How are these changes tested?
Verified locally that
prettier --check "**/*.md"passes with the file ignored (including after appending a deliberately misaligned row), and that all 20 tables retain consistent column counts after the reformat, with the escaped-pipe cell (`\|`inbitwise_funcs) preserved.