There are two options:
- Add a new
--diff option to ruff format --check that prints the formatting changes similar to Black
--check uses Ruff's diagnostic system and shows diffs for format: human but not for format: compact (which would enable diffs by default)
I prefer option 2.
Open questions
- Should this be integrated into our diagnostic system?
- Should it print the entire diff or collapse very large code frames
- Which diffing library to use. We ran into exponential back-tracking cases in our
cargo dev script for large files / large changes
CC @zanieb regarding CLI design