Skip to content

Commit

Permalink
Support --fix in watch mode (#4035)
Browse files Browse the repository at this point in the history
  • Loading branch information
evanrittenhouse committed Apr 20, 2023
1 parent cb762f4 commit 6e8d561
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/ruff_cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
let printer = Printer::new(format, log_level, autofix, printer_flags);

if cli.watch {
if !matches!(autofix, flags::FixMode::None) {
warn_user_once!("--fix is unsupported in watch mode.");
}
if format != SerializationFormat::Text {
warn_user_once!("--format 'text' is used in watch mode.");
}
Expand Down Expand Up @@ -226,7 +223,7 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
&overrides,
cache.into(),
noqa.into(),
flags::FixMode::None,
autofix,
)?;
printer.write_continuously(&messages)?;
}
Expand Down

0 comments on commit 6e8d561

Please sign in to comment.