Deprecate ruff <path>
ruff --explain
, ruff --clean
and `ruff --… · astral-sh/ruff@eceffe7 (original) (raw)
`@@ -12,7 +12,7 @@ use insta_cmd::{assert_cmd_snapshot, get_cargo_bin};
`
12
12
`use tempfile::TempDir;
`
13
13
``
14
14
`const BIN_NAME: &str = "ruff";
`
15
``
`-
const STDIN_BASE_OPTIONS: &[&str] = &["--no-cache", "--output-format", "concise"];
`
``
15
`+
const STDIN_BASE_OPTIONS: &[&str] = &["check", "--no-cache", "--output-format", "concise"];
`
16
16
``
17
17
`fn tempdir_filter(tempdir: &TempDir) -> String {
`
18
18
`format!(r"{}\?/?", escape(tempdir.path().to_str().unwrap()))
`
`@@ -246,7 +246,6 @@ OTHER = "OTHER"
`
246
246
`}, {
`
247
247
` assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME))
`
248
248
`.current_dir(tempdir.path())
`
249
``
`-
.arg("check")
`
250
249
`.args(STDIN_BASE_OPTIONS)
`
251
250
`.args(["--config", &ruff_toml.file_name().unwrap().to_string_lossy()])
`
252
251
`// Explicitly pass test.py, should be linted regardless of it being excluded by lint.exclude
`
`@@ -293,7 +292,6 @@ inline-quotes = "single"
`
293
292
`}, {
`
294
293
` assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME))
`
295
294
`.current_dir(tempdir.path())
`
296
``
`-
.arg("check")
`
297
295
`.args(STDIN_BASE_OPTIONS)
`
298
296
`.args(["--config", &ruff_toml.file_name().unwrap().to_string_lossy()])
`
299
297
`.args(["--stdin-filename", "generated.py"])
`
`@@ -386,7 +384,6 @@ inline-quotes = "single"
`
386
384
`}, {
`
387
385
` assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME))
`
388
386
`.current_dir(tempdir.path())
`
389
``
`-
.arg("check")
`
390
387
`.args(STDIN_BASE_OPTIONS)
`
391
388
`.args(["--config", &ruff_toml.file_name().unwrap().to_string_lossy()])
`
392
389
`.args(["--stdin-filename", "generated.py"])
`
`@@ -435,7 +432,6 @@ inline-quotes = "single"
`
435
432
`}, {
`
436
433
` assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME))
`
437
434
`.current_dir(tempdir.path())
`
438
``
`-
.arg("check")
`
439
435
`.args(STDIN_BASE_OPTIONS)
`
440
436
`.args(["--config", &ruff_toml.file_name().unwrap().to_string_lossy()])
`
441
437
`.args(["--stdin-filename", "generated.py"])
`
`@@ -495,7 +491,6 @@ ignore = ["D203", "D212"]
`
495
491
`}, {
`
496
492
` assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME))
`
497
493
`.current_dir(sub_dir)
`
498
``
`-
.arg("check")
`
499
494
`.args(STDIN_BASE_OPTIONS)
`
500
495
`, @r###"
`
501
496
` success: true
`
`@@ -921,7 +916,6 @@ include = ["*.ipy"]
`
921
916
`}, {
`
922
917
` assert_cmd_snapshot!(Command::new(get_cargo_bin(BIN_NAME))
`
923
918
`.current_dir(tempdir.path())
`
924
``
`-
.arg("check")
`
925
919
`.args(STDIN_BASE_OPTIONS)
`
926
920
`.args(["--config", &ruff_toml.file_name().unwrap().to_string_lossy()])
`
927
921
`.args(["--extension", "ipy:ipynb"])
`