From 3610b076a0f001740af35773c60b21f7a9e1e957 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 14 Mar 2024 12:39:45 -0400 Subject: [PATCH] Restore `--all-targets` for clippy (#9346) This PR restores the `--all-targets` flag when running `cargo clippy`. Without it, there are areas that Clippy does not check, as evidenced by the violations that were caught once the flag was re-added. Release Notes: - N/A --- crates/go_to_line/src/go_to_line.rs | 2 +- crates/outline/src/outline.rs | 2 +- tooling/xtask/src/main.rs | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/go_to_line/src/go_to_line.rs b/crates/go_to_line/src/go_to_line.rs index 2e4402ae5b..4c34468df4 100644 --- a/crates/go_to_line/src/go_to_line.rs +++ b/crates/go_to_line/src/go_to_line.rs @@ -337,7 +337,7 @@ mod tests { workspace: &View, cx: &mut VisualTestContext, ) -> View { - cx.dispatch_action(Toggle::default()); + cx.dispatch_action(Toggle); workspace.update(cx, |workspace, cx| { workspace.active_modal::(cx).unwrap().clone() }) diff --git a/crates/outline/src/outline.rs b/crates/outline/src/outline.rs index 3460cf29d5..63aa1cc991 100644 --- a/crates/outline/src/outline.rs +++ b/crates/outline/src/outline.rs @@ -447,7 +447,7 @@ mod tests { workspace: &View, cx: &mut VisualTestContext, ) -> View> { - cx.dispatch_action(Toggle::default()); + cx.dispatch_action(Toggle); workspace.update(cx, |workspace, cx| { workspace .active_modal::(cx) diff --git a/tooling/xtask/src/main.rs b/tooling/xtask/src/main.rs index b721c46f7e..9577f9b979 100644 --- a/tooling/xtask/src/main.rs +++ b/tooling/xtask/src/main.rs @@ -47,7 +47,10 @@ fn run_clippy(args: ClippyArgs) -> Result<()> { clippy_command.arg("--workspace"); } - clippy_command.arg("--release").arg("--all-features"); + clippy_command + .arg("--release") + .arg("--all-targets") + .arg("--all-features"); if args.fix { clippy_command.arg("--fix");