Skip to content

Commit

Permalink
Remove ecosystem_ci flag from Ruff CLI (#12596)
Browse files Browse the repository at this point in the history
## Summary

@zanieb noticed while we were discussing #12595 that this flag is now
unnecessary, so remove it and the flags which reference it.

## Test Plan

Question for maintainers: is there a test to add *or* remove here? (I’ve
opened this as a draft PR with that in view!)
  • Loading branch information
chriskrycho authored Jul 31, 2024
1 parent a44d579 commit c1bc7f4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
5 changes: 0 additions & 5 deletions crates/ruff/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,6 @@ pub struct CheckCommand {
conflicts_with = "watch",
)]
pub show_settings: bool,
/// Dev-only argument to show fixes
#[arg(long, hide = true)]
pub ecosystem_ci: bool,
}

#[derive(Clone, Debug, clap::Parser)]
Expand Down Expand Up @@ -662,7 +659,6 @@ impl CheckCommand {
let check_arguments = CheckArguments {
add_noqa: self.add_noqa,
diff: self.diff,
ecosystem_ci: self.ecosystem_ci,
exit_non_zero_on_fix: self.exit_non_zero_on_fix,
exit_zero: self.exit_zero,
files: self.files,
Expand Down Expand Up @@ -946,7 +942,6 @@ fn resolve_output_format(
pub struct CheckArguments {
pub add_noqa: bool,
pub diff: bool,
pub ecosystem_ci: bool,
pub exit_non_zero_on_fix: bool,
pub exit_zero: bool,
pub files: Vec<PathBuf>,
Expand Down
7 changes: 0 additions & 7 deletions crates/ruff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,6 @@ pub fn check(args: CheckCommand, global_options: GlobalConfigArgs) -> Result<Exi
if show_fixes {
printer_flags |= PrinterFlags::SHOW_FIX_SUMMARY;
}
if cli.ecosystem_ci {
warn_user!(
"The formatting of fixes emitted by this option is a work-in-progress, subject to \
change at any time, and intended only for internal use."
);
printer_flags |= PrinterFlags::SHOW_FIX_DIFF;
}

#[cfg(debug_assertions)]
if cache {
Expand Down
2 changes: 1 addition & 1 deletion python/ruff-ecosystem/ruff_ecosystem/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def to_ruff_args(self) -> list[str]:
if self.exclude:
args.extend(["--exclude", self.exclude])
if self.show_fixes:
args.extend(["--show-fixes", "--ecosystem-ci"])
args.extend(["--show-fixes"])
return args


Expand Down
2 changes: 1 addition & 1 deletion scripts/check_ecosystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async def check(
if exclude:
ruff_args.extend(["--exclude", exclude])
if show_fixes:
ruff_args.extend(["--show-fixes", "--ecosystem-ci"])
ruff_args.extend(["--show-fixes"])

start = time.time()
proc = await create_subprocess_exec(
Expand Down

0 comments on commit c1bc7f4

Please sign in to comment.