Commit graph

9 commits

Author SHA1 Message Date
Kaiyi Li
0328e0e86b cli: simplify jj fix child process handling
* `Some(x).unwrap()` is not necessary.
* Add a new test to ensure that we handle the fix child process IO
  without deadlock. The new test introduces byte mode to fake-formatter
  which pipe the stdin contents to stdout byte by byte in a streaming
  fashion. The test contents are 512KB, which is larger than page size,
  can trigger the blocking read behavior, and doesn't make the test the
  slowest.
2025-11-25 15:54:00 +00:00
Kaiyi Li
70ddaf8c6f fix: change fake-formatter to not emit ending LF
If the original file doesn't end with LF, the output file won't end with
LF.
2025-11-25 15:54:00 +00:00
Benjamin Brittain
94ad20f00e fake-formatter: remove unused clap::arg import
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-24.04) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
2025-10-20 02:02:38 +00:00
Austin Seipp
ba24140f1d cli, lib: move to Rust 2024 language edition
This applies a `cargo fmt` and fixes clippy lints to keep the build
properly working.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-07-28 17:05:41 +00:00
Ilya Grigoriev
acaedc3382 cleanup: enable unused_trait_names clippy lint and run clippy --fix 2025-03-16 00:35:56 +00:00
Samuel Tardieu
46e2723464 style: inline variables into format strings 2024-10-04 22:29:13 +02:00
Matt Kulukundis
8ead72e99f formatting only: switch to Item level import ganularity 2024-08-22 14:52:54 -04:00
Danny Hooper
8fe2274584 fake-formatter: add --uppercase and --append formatting behaviors
This allows tests to easily distinguish the effects of multiple formatters that
could be applied during a single `jj fix` command, which is helpful for testing
the feature for configuring multiple formatters on potentially overlapping
filesets.

Uppercase is a counterpart to lowercase. Append exposes the number of changes
and their order of execution in the file content, which provides a terse way of
writing test expectations.
2024-07-25 13:40:18 -05:00
Danny Hooper
1ece76d128 cli: add a fake code formatter tool for testing 2024-06-04 14:28:21 -05:00