ruff/crates
Charlie Marsh fad23bbe60
Add a --check flag to the formatter CLI (#6982)
## Summary

Returns an exit code of 1 if any files would be reformatted:

```
ruff on  charlie/format-check:main [$?⇡] is 📦 v0.0.286 via 🐍 v3.11.2 via 🦀 v1.72.0
❯ cargo run -p ruff_cli -- format foo.py --check
   Compiling ruff_cli v0.0.286 (/Users/crmarsh/workspace/ruff/crates/ruff_cli)
    Finished dev [unoptimized + debuginfo] target(s) in 1.69s
     Running `target/debug/ruff format foo.py --check`
warning: `ruff format` is a work-in-progress, subject to change at any time, and intended only for experimentation.
1 file would be reformatted
ruff on  charlie/format-check:main [$?⇡] is 📦 v0.0.286 via 🐍 v3.11.2 via 🦀 v1.72.0 took 2s
❯ echo $?
1
```

Closes #6966.
2023-08-29 12:40:00 -04:00
..
flake8_to_ruff Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff Make RUF100 a suggested fix (#6967) 2023-08-29 04:28:52 +00:00
ruff_benchmark Use Codspeed for continous benchmarking (#6896) 2023-08-26 16:34:35 +02:00
ruff_cache Error on zero tab width (#6429) 2023-08-08 16:51:37 -04:00
ruff_cli Add a --check flag to the formatter CLI (#6982) 2023-08-29 12:40:00 -04:00
ruff_dev Narrow the supported options on the format CLI (#6944) 2023-08-28 15:28:22 +00:00
ruff_diagnostics Implement Ranged on more structs (#6921) 2023-08-27 19:03:08 +00:00
ruff_formatter Update dynamic_text builder doc comment (#6978) 2023-08-29 16:29:11 +02:00
ruff_index Add unreachable code rule (#5384) 2023-07-04 14:27:23 +00:00
ruff_macros Move Configuration to ruff_workspace crate (#6920) 2023-08-28 06:21:35 +00:00
ruff_python_ast [refurb] Implement repeated-append rule (FURB113) (#6702) 2023-08-28 22:51:59 +00:00
ruff_python_codegen Make Parameters an optional field on ExprLambda (#6669) 2023-08-18 15:34:54 +00:00
ruff_python_formatter Remove Comprehension priority (#6947) 2023-08-29 08:30:15 +02:00
ruff_python_index Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
ruff_python_literal Avoid parsing other parts of a format specification if replacements are present (#6858) 2023-08-25 17:42:57 +00:00
ruff_python_parser Add eat_char2 for the lexer (#6968) 2023-08-29 17:18:02 +05:30
ruff_python_resolver Replace .map_or(false, $closure) with .is_some_and(closure) (#6244) 2023-08-01 19:29:42 +02:00
ruff_python_semantic [refurb] Implement repeated-append rule (FURB113) (#6702) 2023-08-28 22:51:59 +00:00
ruff_python_stdlib Add TOML files to SourceType (#6929) 2023-08-28 15:01:48 +00:00
ruff_python_trivia Implement Ranged on more structs (#6921) 2023-08-27 19:03:08 +00:00
ruff_shrinking Move Ranged into ruff_text_size (#6919) 2023-08-27 14:12:51 -04:00
ruff_source_file Allow Locator#slice to take Ranged (#6922) 2023-08-28 11:08:39 -04:00
ruff_text_size Unify line size settings between ruff and the formatter (#6873) 2023-08-28 06:44:56 +00:00
ruff_wasm Add comments option to playground (#6911) 2023-08-28 07:26:23 +00:00
ruff_workspace Fix typo in banned-from (#6977) 2023-08-29 09:39:09 -04:00