Sponsored Content
Skip to content

chore: Make pre-commit line ending conversions work on Windows - #6832

Merged
ximinez merged 1 commit into
ripple/staging-313from
ximinez/fix-crlf-win-313
Apr 9, 2026
Merged

chore: Make pre-commit line ending conversions work on Windows#6832
ximinez merged 1 commit into
ripple/staging-313from
ximinez/fix-crlf-win-313

Conversation

@ximinez

@ximinez ximinez commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Update pre-commit config to keep line endings correct across OSes.

  • Remove the "mixed-line-ending" check, because prettier replaces it.
  • Pass "--end-of-line=auto" to prettier so that it will respect git's
    core.autocrlf setting, and do the right thing on each OS.

Context of Change

Using the old settings, formatting a branch on Windows particularly using pre-commit run -a would convert many files to have unix-style (LF) line endings. This undid the changes done by git's core.autocrlf=true setting, and resulted in a large, bogus change set, plus many warnings along the lines of warning: in the working copy of 'README.md', LF will be replaced by CRLF the next time Git touches it in the output of most git commands.

* Remove the "mixed-line-ending" check, because prettier replaces it.
* Pass "--end-of-line=auto" to prettier so that it will respect git's
  core.autocrlf setting, and do the right thing on each OS.
@ximinez
ximinez requested review from a1q123456 and bthomee April 9, 2026 19:01
@ximinez ximinez added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Apr 9, 2026
@bthomee
bthomee requested review from mathbunnyru and removed request for a1q123456 April 9, 2026 20:43
@bthomee

bthomee commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

@ximinez I suppose we'll want this change also in the develop branch, and as soon as possible too for your sanity?

@ximinez
ximinez merged commit 68b978f into ripple/staging-313 Apr 9, 2026
1 check passed
@ximinez
ximinez deleted the ximinez/fix-crlf-win-313 branch April 9, 2026 22:49
@ximinez

ximinez commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

@ximinez I suppose we'll want this change also in the develop branch, and as soon as possible too for your sanity?

Yep. That was #6833.

@ximinez ximinez added this to the 3.1.3 milestone Apr 15, 2026
marek-foss-neti pushed a commit to marek-foss-neti/rippled that referenced this pull request May 5, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants