mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:52:01 +00:00
Support --fix in watch mode (#4035)
This commit is contained in:
parent
cb762f4cad
commit
6e8d561090
1 changed files with 1 additions and 4 deletions
|
@ -179,9 +179,6 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
|
||||||
let printer = Printer::new(format, log_level, autofix, printer_flags);
|
let printer = Printer::new(format, log_level, autofix, printer_flags);
|
||||||
|
|
||||||
if cli.watch {
|
if cli.watch {
|
||||||
if !matches!(autofix, flags::FixMode::None) {
|
|
||||||
warn_user_once!("--fix is unsupported in watch mode.");
|
|
||||||
}
|
|
||||||
if format != SerializationFormat::Text {
|
if format != SerializationFormat::Text {
|
||||||
warn_user_once!("--format 'text' is used in watch mode.");
|
warn_user_once!("--format 'text' is used in watch mode.");
|
||||||
}
|
}
|
||||||
|
@ -226,7 +223,7 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result<ExitStatus> {
|
||||||
&overrides,
|
&overrides,
|
||||||
cache.into(),
|
cache.into(),
|
||||||
noqa.into(),
|
noqa.into(),
|
||||||
flags::FixMode::None,
|
autofix,
|
||||||
)?;
|
)?;
|
||||||
printer.write_continuously(&messages)?;
|
printer.write_continuously(&messages)?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue