Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Run additional checks from script/clippy if local (#29768)
Cole Millerd25da9728bdb
diff --git a/crates/dap/src/adapters.rs b/crates/dap/src/adapters.rsindex 01e012b6c33..343dd1eb9bd 100644--- a/crates/dap/src/adapters.rs+++ b/crates/dap/src/adapters.rs@@ -444,10 +444,7 @@ pub trait DebugAdapter: 'static + Send + Sync {log::info!("Getting latest version of debug adapter {}", self.name());delegate.update_status(self.name(), DapStatus::CheckingForUpdate);if let Some(version) = self.fetch_latest_adapter_version(delegate).await.log_err() {- log::info!(- "Installiing latest version of debug adapter {}",- self.name()- );+ log::info!("Installing latest version of debug adapter {}", self.name());delegate.update_status(self.name(), DapStatus::Downloading);match self.install_binary(version, delegate).await {Ok(_) => {diff --git a/crates/debugger_ui/src/session/running.rs b/crates/debugger_ui/src/session/running.rsindex f22fe77afe5..e908c7c1199 100644--- a/crates/debugger_ui/src/session/running.rs+++ b/crates/debugger_ui/src/session/running.rs@@ -188,7 +188,7 @@ impl Render for SubView {cx.notify();})).size_full()- // Add border uncoditionally to prevent layout shifts on focus changes.+ // Add border unconditionally to prevent layout shifts on focus changes..border_1().when(self.pane_focus_handle.contains_focused(window, cx), |el| {el.border_color(cx.theme().colors().pane_focused_border)diff --git a/crates/outline_panel/src/outline_panel.rs b/crates/outline_panel/src/outline_panel.rsindex a89bba6a452..b9f07280c35 100644--- a/crates/outline_panel/src/outline_panel.rs+++ b/crates/outline_panel/src/outline_panel.rs@@ -646,7 +646,7 @@ struct ActiveItem {item_handle: Box<dyn WeakItemHandle>,active_editor: WeakEntity<Editor>,_buffer_search_subscription: Subscription,- _editor_subscrpiption: Subscription,+ _editor_subscription: Subscription,}#[derive(Debug)]@@ -2962,7 +2962,7 @@ impl OutlinePanel {);self.active_item = Some(ActiveItem {_buffer_search_subscription: buffer_search_subscription,- _editor_subscrpiption: subscribe_for_editor_events(&new_active_editor, window, cx),+ _editor_subscription: subscribe_for_editor_events(&new_active_editor, window, cx),item_handle: new_active_item.downgrade_item(),active_editor: new_active_editor.downgrade(),});diff --git a/crates/project/src/project_settings.rs b/crates/project/src/project_settings.rsindex dec8cd4b275..0d5fb6ab7e6 100644--- a/crates/project/src/project_settings.rs+++ b/crates/project/src/project_settings.rs@@ -129,7 +129,7 @@ pub struct InlineDiagnosticsSettings {/// Default: false#[serde(default)]pub enabled: bool,- /// Whether to only show the inline diaganostics after a delay after the+ /// Whether to only show the inline diagnostics after a delay after the/// last editor event.////// Default: 150diff --git a/extensions/EXTRACTION.md b/extensions/EXTRACTION.mdindex 35b33514cc2..2bcc8e35d58 100644--- a/extensions/EXTRACTION.md+++ b/extensions/EXTRACTION.md@@ -145,7 +145,7 @@ git push origin v${NEW_VERSION}rm -rf extensions/$LANGNAMEsed -i '' "/extensions\/$LANGNAME/d" Cargo.tomlcargo check-git checkoout -b remove_$LANGNAME+git checkout -b remove_$LANGNAMEgit add extensions/$LANGNAMEgit add Cargo.toml Cargo.lock extensions/$LANGNAMEgit commit -m "Migrate to $LANGNAME extension to zed-extensions/$LANGNAME"diff --git a/script/clippy b/script/clippyindex e81dccf2df7..5c13b0b39ce 100755--- a/script/clippy+++ b/script/clippy@@ -8,3 +8,12 @@ fiset -x"${CARGO:-cargo}" clippy "$@" --release --all-targets --all-features -- --deny warnings++# If local, run other checks if we have the tools installed.+if [[ -z "${GITHUB_ACTIONS+x}" ]]; then+ which cargo-machete >/dev/null 2>&1 || exit 0+ cargo machete++ which typos >/dev/null 2>&1 || exit 0+ typos --config typos.toml+fidiff --git a/typos.toml b/typos.tomlindex 75f50545d68..08caa178d1d 100644--- a/typos.toml+++ b/typos.toml@@ -46,6 +46,8 @@ extend-exclude = ["script/danger/dangerfile.ts",# Eval examples for prompts and criteria"crates/eval/src/examples/",+ # typos-cli doesn't understand our `vˇariable` markup+ "crates/editor/src/hover_links.rs"][default]@@ -63,6 +65,8 @@ extend-ignore-re = [# macOS version"Big Sur",# Not an actual typo but an intentionally invalid color, in `color_extractor`- "#fof"+ "#fof",+ # Stropped version of reserved keyword `type`+ "typ"]check-filename = true