Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Dec 11, 2025

closes #15066

The difficult part here is only calculate line ending at the really end, just before write, to avoid memory allocations on the source text when you insert a newline.

@leaysgur This feature also requires a single file formatter so we can apply this to node API and file system write. The single file formatter need to accept a Writer so we can write to string or file.

closes #15066

The difficult part here is only calculate line ending at the really end,
just before write, to avoid memory allocations on the source text when
you insert a newline.

@leaysgur This feature also requires a single file formatter so we can apply
this to node API and file system write. The single file formatter need
to accept a `Writer` so we can write to string or file.
@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter C-enhancement Category - New feature or request labels Dec 11, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 11, 2025

CodSpeed Performance Report

Merging #16757 will not alter performance

Comparing 12-11-feat_oxfmt_add_insert_final_newline_option (e849aaf) with main (083e081)1

Summary

✅ 30 untouched
⏩ 15 skipped2

Footnotes

  1. No successful run was found on main (2acd66e) during the generation of this report, so 083e081 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 15 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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

Labels

A-cli Area - CLI A-formatter Area - Formatter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

formatter: Disable New line at the end of file

3 participants