diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index daf5f5012c..1031796ac8 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -83,4 +83,3 @@ colored = { workspace = true, features = ["no-color"] } default = [] schemars = ["dep:schemars"] jupyter_notebook = [] -ecosystem_ci = [] diff --git a/crates/ruff_cli/Cargo.toml b/crates/ruff_cli/Cargo.toml index 7a1eeb47ff..64103e4093 100644 --- a/crates/ruff_cli/Cargo.toml +++ b/crates/ruff_cli/Cargo.toml @@ -66,7 +66,6 @@ ureq = { version = "2.6.2", features = [] } [features] jupyter_notebook = ["ruff/jupyter_notebook"] -ecosystem_ci = ["ruff/ecosystem_ci"] [target.'cfg(target_os = "windows")'.dependencies] mimalloc = "0.1.34" diff --git a/crates/ruff_cli/src/args.rs b/crates/ruff_cli/src/args.rs index 8ef8e400d5..b6f8d096eb 100644 --- a/crates/ruff_cli/src/args.rs +++ b/crates/ruff_cli/src/args.rs @@ -325,7 +325,6 @@ pub struct CheckArgs { )] pub show_settings: bool, /// Dev-only argument to show fixes - #[cfg(feature = "ecosystem_ci")] #[arg(long, hide = true)] pub ecosystem_ci: bool, } diff --git a/crates/ruff_cli/src/commands/run.rs b/crates/ruff_cli/src/commands/run.rs index 07d25afcaa..d3e42651a8 100644 --- a/crates/ruff_cli/src/commands/run.rs +++ b/crates/ruff_cli/src/commands/run.rs @@ -254,7 +254,6 @@ mod test { LogLevel::Default, FixMode::None, Flags::SHOW_VIOLATIONS, - #[cfg(feature = "ecosystem_ci")] false, ); let mut writer: Vec = Vec::new(); diff --git a/crates/ruff_cli/src/lib.rs b/crates/ruff_cli/src/lib.rs index 4bb05f9ab0..b57a646ed7 100644 --- a/crates/ruff_cli/src/lib.rs +++ b/crates/ruff_cli/src/lib.rs @@ -155,8 +155,13 @@ fn format(files: &[PathBuf]) -> Result { } fn check(args: CheckArgs, log_level: LogLevel) -> Result { - #[cfg(feature = "ecosystem_ci")] let ecosystem_ci = args.ecosystem_ci; + if ecosystem_ci { + warn_user_once!( + "The formatting of fixes emitted by this option is a work-in-progress, subject to \ + change at any time, and intended for use with the ecosystem ci scripts only." + ); + } let (cli, overrides) = args.partition(); // Construct the "default" settings. These are used when no `pyproject.toml` @@ -243,14 +248,7 @@ fn check(args: CheckArgs, log_level: LogLevel) -> Result { return Ok(ExitStatus::Success); } - let printer = Printer::new( - format, - log_level, - autofix, - printer_flags, - #[cfg(feature = "ecosystem_ci")] - ecosystem_ci, - ); + let printer = Printer::new(format, log_level, autofix, printer_flags, ecosystem_ci); if cli.watch { if format != SerializationFormat::Text { diff --git a/crates/ruff_cli/src/printer.rs b/crates/ruff_cli/src/printer.rs index d82febf2de..9233bf19c1 100644 --- a/crates/ruff_cli/src/printer.rs +++ b/crates/ruff_cli/src/printer.rs @@ -71,7 +71,6 @@ pub(crate) struct Printer { autofix_level: flags::FixMode, flags: Flags, /// Dev-only argument to show fixes - #[cfg(feature = "ecosystem_ci")] ecosystem_ci: bool, } @@ -81,14 +80,13 @@ impl Printer { log_level: LogLevel, autofix_level: flags::FixMode, flags: Flags, - #[cfg(feature = "ecosystem_ci")] ecosystem_ci: bool, + ecosystem_ci: bool, ) -> Self { Self { format, log_level, autofix_level, flags, - #[cfg(feature = "ecosystem_ci")] ecosystem_ci, } } @@ -189,10 +187,7 @@ impl Printer { JunitEmitter::default().emit(writer, &diagnostics.messages, &context)?; } SerializationFormat::Text => { - #[cfg(feature = "ecosystem_ci")] let show_fixes = self.ecosystem_ci && self.flags.contains(Flags::SHOW_FIXES); - #[cfg(not(feature = "ecosystem_ci"))] - let show_fixes = false; TextEmitter::default() .with_show_fix_status(show_fix_status(self.autofix_level))