ruff/crates/ruff_cli
Charlie Marsh 5d21b9c22e
Catch panics in formatter (#7377)
## Summary

This PR ensures that we catch and render panics in the formatter
identically to other kinds of errors. It also improves the consistency
in error rendering throughout and makes a few stylistic changes to the
messages.

Closes https://github.com/astral-sh/ruff/issues/7247.

## Test Plan

I created a file `foo.py` with a syntax error, and a file `bar.py` with
an intentional panic.

<img width="1624" alt="Screen Shot 2023-09-13 at 10 25 22 PM"
src="605c2839-ad02-4376-a2e9-d5a593ab660f">

<img width="1624" alt="Screen Shot 2023-09-13 at 10 25 24 PM"
src="b1381909-157c-48cb-9630-d0bbfcb1b640">
2023-09-14 11:44:16 -04:00
..
resources/test/fixtures Include file permissions in key for cached files (#5901) 2023-07-25 17:06:47 +00:00
src Catch panics in formatter (#7377) 2023-09-14 11:44:16 -04:00
tests Add warnings for nursery and preview rule selection (#7210) 2023-09-13 15:29:58 -05:00
Cargo.toml chore: Upgrade notify (#7338) 2023-09-14 09:47:55 +00:00