ruff/crates/ruff_cli/src
Charlie Marsh afcd00da56
Create ruff_notebook crate (#7039)
## Summary

This PR moves `ruff/jupyter` into its own `ruff_notebook` crate. Beyond
the move itself, there were a few challenges:

1. `ruff_notebook` relies on the source map abstraction. I've moved the
source map into `ruff_diagnostics`, since it doesn't have any
dependencies on its own and is used alongside diagnostics.
2. `ruff_notebook` has a couple tests for end-to-end linting and
autofixing. I had to leave these tests in `ruff` itself.
3. We had code in `ruff/jupyter` that relied on Python lexing, in order
to provide a more targeted error message in the event that a user saves
a `.py` file with a `.ipynb` extension. I removed this in order to avoid
a dependency on the parser, it felt like it wasn't worth retaining just
for that dependency.

## Test Plan

`cargo test`
2023-09-01 13:56:44 +00:00
..
bin Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
commands Refactor ruff_cli's run method to return on each branch (#7040) 2023-09-01 14:15:38 +01:00
args.rs Add hidden --preview / --no-preview options to ruff check (#7009) 2023-08-31 09:51:59 -05:00
cache.rs Refactor SourceKind to store file content (#6640) 2023-08-18 13:45:38 +00:00
diagnostics.rs Create ruff_notebook crate (#7039) 2023-09-01 13:56:44 +00:00
lib.rs Refactor ruff_cli's run method to return on each branch (#7040) 2023-09-01 14:15:38 +01:00
panic.rs Disallow unreachable_pub (#4314) 2023-05-11 18:00:00 -04:00
printer.rs Refactor SourceKind to store file content (#6640) 2023-08-18 13:45:38 +00:00
resolve.rs Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00
stdin.rs Move stdin formatting to its own command file (#6981) 2023-08-29 16:06:10 +00:00