Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Move Clippy configuration to the workspace level (#8891)

Marshall Bowers22fe03913ca1
diff --git a/Cargo.lock b/Cargo.lock
index 3bbc622c37a..9e19a6c5a05 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3927,7 +3927,7 @@ dependencies = [
[[package]]
name = "fsevent"
-version = "2.0.2"
+version = "0.1.0"
dependencies = [
"bitflags 2.4.2",
"fsevent-sys 3.1.0",
diff --git a/Cargo.toml b/Cargo.toml
index 40364b95288..ae3df6cf959 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -322,8 +322,6 @@ features = [
"Win32_System_Ole",
]
-
-
[patch.crates-io]
tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "e4a23971ec3071a09c1e84816954c98f96e98e52" }
# Workaround for a broken nightly build of gpui: See #7644 and revisit once 0.5.3 is released.
@@ -350,5 +348,46 @@ debug = "limited"
lto = "thin"
codegen-units = 1
+[workspace.lints.clippy]
+dbg_macro = "deny"
+todo = "deny"
+
+# These are all of the rules that currently have violations in the Zed
+# codebase.
+#
+# We'll want to drive this list down by either:
+# 1. fixing violations of the rule and begin enforcing it
+# 2. deciding we want to allow the rule permanently, at which point
+# we should codify that separately above.
+#
+# This list shouldn't be added to; it should only get shorter.
+# =============================================================================
+
+# There are a bunch of rules currently failing in the `style` group, so
+# allow all of those, for now.
+style = "allow"
+
+# Individual rules that have violations in the codebase:
+almost_complete_range = "allow"
+arc_with_non_send_sync = "allow"
+await_holding_lock = "allow"
+borrow_deref_ref = "allow"
+borrowed_box = "allow"
+cast_abs_to_unsigned = "allow"
+cmp_owned = "allow"
+derive_ord_xor_partial_ord = "allow"
+eq_op = "allow"
+implied_bounds_in_impls = "allow"
+let_underscore_future = "allow"
+map_entry = "allow"
+never_loop = "allow"
+non_canonical_clone_impl = "allow"
+non_canonical_partial_ord_impl = "allow"
+reversed_empty_ranges = "allow"
+single_range_in_vec_init = "allow"
+suspicious_to_owned = "allow"
+type_complexity = "allow"
+unnecessary_to_owned = "allow"
+
[workspace.metadata.cargo-machete]
ignored = ["bindgen", "cbindgen", "prost_build", "serde"]
diff --git a/crates/activity_indicator/Cargo.toml b/crates/activity_indicator/Cargo.toml
index 1513377e7da..ff0ae5c6a1e 100644
--- a/crates/activity_indicator/Cargo.toml
+++ b/crates/activity_indicator/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/activity_indicator.rs"
doctest = false
diff --git a/crates/ai/Cargo.toml b/crates/ai/Cargo.toml
index 726c7329dc5..69c3b88e62a 100644
--- a/crates/ai/Cargo.toml
+++ b/crates/ai/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/ai.rs"
doctest = false
diff --git a/crates/assets/Cargo.toml b/crates/assets/Cargo.toml
index 19eef955dc8..8fcb1f9cfe2 100644
--- a/crates/assets/Cargo.toml
+++ b/crates/assets/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
anyhow.workspace = true
gpui.workspace = true
diff --git a/crates/assistant/Cargo.toml b/crates/assistant/Cargo.toml
index 3f24babef6d..d84075a632b 100644
--- a/crates/assistant/Cargo.toml
+++ b/crates/assistant/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/assistant.rs"
doctest = false
diff --git a/crates/audio/Cargo.toml b/crates/audio/Cargo.toml
index d66df11f9f3..bfe22de1f07 100644
--- a/crates/audio/Cargo.toml
+++ b/crates/audio/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/audio.rs"
doctest = false
diff --git a/crates/auto_update/Cargo.toml b/crates/auto_update/Cargo.toml
index 8135d5b795d..6d4de08d040 100644
--- a/crates/auto_update/Cargo.toml
+++ b/crates/auto_update/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/auto_update.rs"
doctest = false
diff --git a/crates/breadcrumbs/Cargo.toml b/crates/breadcrumbs/Cargo.toml
index 24f3a70fd33..45d0f09f660 100644
--- a/crates/breadcrumbs/Cargo.toml
+++ b/crates/breadcrumbs/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/breadcrumbs.rs"
doctest = false
diff --git a/crates/call/Cargo.toml b/crates/call/Cargo.toml
index a0acf544b5d..569026d006a 100644
--- a/crates/call/Cargo.toml
+++ b/crates/call/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/call.rs"
doctest = false
diff --git a/crates/channel/Cargo.toml b/crates/channel/Cargo.toml
index ccd690059f0..49132a4b7b5 100644
--- a/crates/channel/Cargo.toml
+++ b/crates/channel/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/channel.rs"
doctest = false
diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml
index 60285628e80..6316c64bdc8 100644
--- a/crates/cli/Cargo.toml
+++ b/crates/cli/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/cli.rs"
doctest = false
diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml
index 4dc8c38ef4a..2b45efec85c 100644
--- a/crates/client/Cargo.toml
+++ b/crates/client/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/client.rs"
doctest = false
diff --git a/crates/clock/Cargo.toml b/crates/clock/Cargo.toml
index adef338cc77..d1fb21747b3 100644
--- a/crates/clock/Cargo.toml
+++ b/crates/clock/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/clock.rs"
doctest = false
diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml
index 7cd499513a3..35e1a47baf3 100644
--- a/crates/collab/Cargo.toml
+++ b/crates/collab/Cargo.toml
@@ -7,6 +7,9 @@ version = "0.44.0"
publish = false
license = "AGPL-3.0-or-later"
+[lints]
+workspace = true
+
[[bin]]
name = "collab"
diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.toml
index e88d191af57..ab8b85321e6 100644
--- a/crates/collab_ui/Cargo.toml
+++ b/crates/collab_ui/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/collab_ui.rs"
doctest = false
diff --git a/crates/collections/Cargo.toml b/crates/collections/Cargo.toml
index 85cee90e125..b16b4c1300e 100644
--- a/crates/collections/Cargo.toml
+++ b/crates/collections/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[lib]
path = "src/collections.rs"
doctest = false
diff --git a/crates/color/Cargo.toml b/crates/color/Cargo.toml
index d3e4a125f4d..a68a5fb5186 100644
--- a/crates/color/Cargo.toml
+++ b/crates/color/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[features]
default = []
diff --git a/crates/command_palette/Cargo.toml b/crates/command_palette/Cargo.toml
index 565939e4a35..eecd80b6e19 100644
--- a/crates/command_palette/Cargo.toml
+++ b/crates/command_palette/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/command_palette.rs"
doctest = false
diff --git a/crates/command_palette_hooks/Cargo.toml b/crates/command_palette_hooks/Cargo.toml
index 8dd8b7bf69b..cc4f396bf83 100644
--- a/crates/command_palette_hooks/Cargo.toml
+++ b/crates/command_palette_hooks/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/command_palette_hooks.rs"
doctest = false
diff --git a/crates/copilot/Cargo.toml b/crates/copilot/Cargo.toml
index eca15d3c56a..609bd0e3a80 100644
--- a/crates/copilot/Cargo.toml
+++ b/crates/copilot/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/copilot.rs"
doctest = false
diff --git a/crates/copilot_ui/Cargo.toml b/crates/copilot_ui/Cargo.toml
index cc83e09aa6c..cc184b2dfc7 100644
--- a/crates/copilot_ui/Cargo.toml
+++ b/crates/copilot_ui/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/copilot_ui.rs"
doctest = false
diff --git a/crates/db/Cargo.toml b/crates/db/Cargo.toml
index 0b01e691b18..f31609277db 100644
--- a/crates/db/Cargo.toml
+++ b/crates/db/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/db.rs"
doctest = false
diff --git a/crates/diagnostics/Cargo.toml b/crates/diagnostics/Cargo.toml
index e4e408b6659..fcaacfd62a4 100644
--- a/crates/diagnostics/Cargo.toml
+++ b/crates/diagnostics/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/diagnostics.rs"
doctest = false
diff --git a/crates/editor/Cargo.toml b/crates/editor/Cargo.toml
index 8266e12ba7b..78aeae8ca9f 100644
--- a/crates/editor/Cargo.toml
+++ b/crates/editor/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/editor.rs"
doctest = false
diff --git a/crates/extension/Cargo.toml b/crates/extension/Cargo.toml
index 7c0e2d7afa0..d5ceeeff4b5 100644
--- a/crates/extension/Cargo.toml
+++ b/crates/extension/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/extension_store.rs"
diff --git a/crates/extension_api/Cargo.toml b/crates/extension_api/Cargo.toml
index 1adbd0c0ee1..84d2064eb57 100644
--- a/crates/extension_api/Cargo.toml
+++ b/crates/extension_api/Cargo.toml
@@ -4,6 +4,9 @@ version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
+[lints]
+workspace = true
+
[lib]
path = "src/extension_api.rs"
diff --git a/crates/extensions_ui/Cargo.toml b/crates/extensions_ui/Cargo.toml
index df55a5091a5..7c2320717fc 100644
--- a/crates/extensions_ui/Cargo.toml
+++ b/crates/extensions_ui/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/extensions_ui.rs"
diff --git a/crates/feature_flags/Cargo.toml b/crates/feature_flags/Cargo.toml
index cf0f9475af8..101e90c6460 100644
--- a/crates/feature_flags/Cargo.toml
+++ b/crates/feature_flags/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/feature_flags.rs"
diff --git a/crates/feedback/Cargo.toml b/crates/feedback/Cargo.toml
index b3c89e2c544..05465ba95b9 100644
--- a/crates/feedback/Cargo.toml
+++ b/crates/feedback/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/feedback.rs"
diff --git a/crates/file_finder/Cargo.toml b/crates/file_finder/Cargo.toml
index 377bc2dc2a9..283b7c54950 100644
--- a/crates/file_finder/Cargo.toml
+++ b/crates/file_finder/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/file_finder.rs"
doctest = false
diff --git a/crates/fs/Cargo.toml b/crates/fs/Cargo.toml
index 4b48dbc2bf1..4a26a13e5f9 100644
--- a/crates/fs/Cargo.toml
+++ b/crates/fs/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/fs.rs"
diff --git a/crates/fsevent/Cargo.toml b/crates/fsevent/Cargo.toml
index 23490e8fa53..6a5a01843d1 100644
--- a/crates/fsevent/Cargo.toml
+++ b/crates/fsevent/Cargo.toml
@@ -1,10 +1,12 @@
[package]
name = "fsevent"
-version = "2.0.2"
-license = "MIT"
+version = "0.1.0"
edition = "2021"
publish = false
+license = "GPL-3.0-or-later"
+[lints]
+workspace = true
[lib]
path = "src/fsevent.rs"
diff --git a/crates/fuzzy/Cargo.toml b/crates/fuzzy/Cargo.toml
index 3b323afdaac..e3a016c98b7 100644
--- a/crates/fuzzy/Cargo.toml
+++ b/crates/fuzzy/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/fuzzy.rs"
doctest = false
diff --git a/crates/git/Cargo.toml b/crates/git/Cargo.toml
index 720a0cdd323..4a47b74d59f 100644
--- a/crates/git/Cargo.toml
+++ b/crates/git/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/git.rs"
diff --git a/crates/go_to_line/Cargo.toml b/crates/go_to_line/Cargo.toml
index a009e275476..921434a4078 100644
--- a/crates/go_to_line/Cargo.toml
+++ b/crates/go_to_line/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/go_to_line.rs"
doctest = false
diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml
index de83868b35a..c4a2432ecea 100644
--- a/crates/gpui/Cargo.toml
+++ b/crates/gpui/Cargo.toml
@@ -7,6 +7,9 @@ description = "Zed's GPU-accelerated UI framework"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[features]
test-support = [
"backtrace",
diff --git a/crates/gpui_macros/Cargo.toml b/crates/gpui_macros/Cargo.toml
index f5a75891392..b48da0429e9 100644
--- a/crates/gpui_macros/Cargo.toml
+++ b/crates/gpui_macros/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[lib]
path = "src/gpui_macros.rs"
proc-macro = true
diff --git a/crates/install_cli/Cargo.toml b/crates/install_cli/Cargo.toml
index 8afccceaaf1..4edeb01dcda 100644
--- a/crates/install_cli/Cargo.toml
+++ b/crates/install_cli/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/install_cli.rs"
diff --git a/crates/journal/Cargo.toml b/crates/journal/Cargo.toml
index 325e6b52970..e5dd558fa8f 100644
--- a/crates/journal/Cargo.toml
+++ b/crates/journal/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/journal.rs"
doctest = false
diff --git a/crates/language/Cargo.toml b/crates/language/Cargo.toml
index 77abad1ecf6..e6f2a45ea58 100644
--- a/crates/language/Cargo.toml
+++ b/crates/language/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/language.rs"
doctest = false
diff --git a/crates/language_selector/Cargo.toml b/crates/language_selector/Cargo.toml
index 5365be61a90..b864ffc31f3 100644
--- a/crates/language_selector/Cargo.toml
+++ b/crates/language_selector/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/language_selector.rs"
doctest = false
diff --git a/crates/language_tools/Cargo.toml b/crates/language_tools/Cargo.toml
index 2afad658c8b..6d0a1199b3d 100644
--- a/crates/language_tools/Cargo.toml
+++ b/crates/language_tools/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/language_tools.rs"
doctest = false
diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml
index 8dd4078abce..122607791e0 100644
--- a/crates/languages/Cargo.toml
+++ b/crates/languages/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
anyhow.workspace = true
async-compression.workspace = true
diff --git a/crates/live_kit_client/Cargo.toml b/crates/live_kit_client/Cargo.toml
index a18199fe5aa..708fd61d410 100644
--- a/crates/live_kit_client/Cargo.toml
+++ b/crates/live_kit_client/Cargo.toml
@@ -6,6 +6,9 @@ description = "Bindings to LiveKit Swift client SDK"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/live_kit_client.rs"
doctest = false
diff --git a/crates/live_kit_server/Cargo.toml b/crates/live_kit_server/Cargo.toml
index 3c742111c49..bdac22a85cd 100644
--- a/crates/live_kit_server/Cargo.toml
+++ b/crates/live_kit_server/Cargo.toml
@@ -6,6 +6,9 @@ description = "SDK for the LiveKit server API"
publish = false
license = "AGPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/live_kit_server.rs"
doctest = false
diff --git a/crates/lsp/Cargo.toml b/crates/lsp/Cargo.toml
index 902105341be..23b2f204ef3 100644
--- a/crates/lsp/Cargo.toml
+++ b/crates/lsp/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/lsp.rs"
doctest = false
diff --git a/crates/markdown_preview/Cargo.toml b/crates/markdown_preview/Cargo.toml
index 5ac5ae3cb5a..f3192a79cac 100644
--- a/crates/markdown_preview/Cargo.toml
+++ b/crates/markdown_preview/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/markdown_preview.rs"
diff --git a/crates/media/Cargo.toml b/crates/media/Cargo.toml
index 784139f1293..ac22eccde67 100644
--- a/crates/media/Cargo.toml
+++ b/crates/media/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[lib]
path = "src/media.rs"
doctest = false
diff --git a/crates/menu/Cargo.toml b/crates/menu/Cargo.toml
index cf177272427..ce12455710a 100644
--- a/crates/menu/Cargo.toml
+++ b/crates/menu/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/menu.rs"
doctest = false
diff --git a/crates/multi_buffer/Cargo.toml b/crates/multi_buffer/Cargo.toml
index 322ff38a5a7..f866217da86 100644
--- a/crates/multi_buffer/Cargo.toml
+++ b/crates/multi_buffer/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/multi_buffer.rs"
doctest = false
diff --git a/crates/node_runtime/Cargo.toml b/crates/node_runtime/Cargo.toml
index 1c608b703fe..7e713a3e2d3 100644
--- a/crates/node_runtime/Cargo.toml
+++ b/crates/node_runtime/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/node_runtime.rs"
doctest = false
diff --git a/crates/notifications/Cargo.toml b/crates/notifications/Cargo.toml
index 40d61087fa3..3e1c856e409 100644
--- a/crates/notifications/Cargo.toml
+++ b/crates/notifications/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/notification_store.rs"
doctest = false
diff --git a/crates/outline/Cargo.toml b/crates/outline/Cargo.toml
index 28dc5d6a1b8..540e979ab3e 100644
--- a/crates/outline/Cargo.toml
+++ b/crates/outline/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/outline.rs"
doctest = false
diff --git a/crates/picker/Cargo.toml b/crates/picker/Cargo.toml
index 510ce14a594..79a8ed70d83 100644
--- a/crates/picker/Cargo.toml
+++ b/crates/picker/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/picker.rs"
doctest = false
diff --git a/crates/prettier/Cargo.toml b/crates/prettier/Cargo.toml
index 242a65ba7bf..586ff0770fe 100644
--- a/crates/prettier/Cargo.toml
+++ b/crates/prettier/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/prettier.rs"
doctest = false
diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml
index c76424144f7..875ebb2de4b 100644
--- a/crates/project/Cargo.toml
+++ b/crates/project/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/project.rs"
doctest = false
diff --git a/crates/project_core/Cargo.toml b/crates/project_core/Cargo.toml
index c72fe909da8..b82e9a26ebd 100644
--- a/crates/project_core/Cargo.toml
+++ b/crates/project_core/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
test-support = [
diff --git a/crates/project_panel/Cargo.toml b/crates/project_panel/Cargo.toml
index 093d47e124d..2772fc18a24 100644
--- a/crates/project_panel/Cargo.toml
+++ b/crates/project_panel/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/project_panel.rs"
doctest = false
diff --git a/crates/project_symbols/Cargo.toml b/crates/project_symbols/Cargo.toml
index 93b122eaf0c..cadbdd83aaa 100644
--- a/crates/project_symbols/Cargo.toml
+++ b/crates/project_symbols/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/project_symbols.rs"
doctest = false
diff --git a/crates/quick_action_bar/Cargo.toml b/crates/quick_action_bar/Cargo.toml
index e1f8c66d106..3d5d56a3185 100644
--- a/crates/quick_action_bar/Cargo.toml
+++ b/crates/quick_action_bar/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/quick_action_bar.rs"
doctest = false
diff --git a/crates/recent_projects/Cargo.toml b/crates/recent_projects/Cargo.toml
index f96dfbdd7db..3e8f63d1336 100644
--- a/crates/recent_projects/Cargo.toml
+++ b/crates/recent_projects/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/recent_projects.rs"
doctest = false
diff --git a/crates/refineable/Cargo.toml b/crates/refineable/Cargo.toml
index 97f03f1f2f2..bda47e7a8a9 100644
--- a/crates/refineable/Cargo.toml
+++ b/crates/refineable/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[lib]
path = "src/refineable.rs"
doctest = false
diff --git a/crates/refineable/derive_refineable/Cargo.toml b/crates/refineable/derive_refineable/Cargo.toml
index f0d6d6d2dc8..00502ec19a2 100644
--- a/crates/refineable/derive_refineable/Cargo.toml
+++ b/crates/refineable/derive_refineable/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[lib]
path = "src/derive_refineable.rs"
proc-macro = true
diff --git a/crates/release_channel/Cargo.toml b/crates/release_channel/Cargo.toml
index b40ce363460..acea552d634 100644
--- a/crates/release_channel/Cargo.toml
+++ b/crates/release_channel/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
gpui.workspace = true
once_cell = "1.19.0"
diff --git a/crates/rich_text/Cargo.toml b/crates/rich_text/Cargo.toml
index 5a12d0e56f2..146fdcbd8a0 100644
--- a/crates/rich_text/Cargo.toml
+++ b/crates/rich_text/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/rich_text.rs"
doctest = false
diff --git a/crates/rope/Cargo.toml b/crates/rope/Cargo.toml
index 9190341f539..b1ce3694167 100644
--- a/crates/rope/Cargo.toml
+++ b/crates/rope/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/rope.rs"
diff --git a/crates/rpc/Cargo.toml b/crates/rpc/Cargo.toml
index 7f6750bce53..a4af21df11b 100644
--- a/crates/rpc/Cargo.toml
+++ b/crates/rpc/Cargo.toml
@@ -6,6 +6,9 @@ version = "0.1.0"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/rpc.rs"
doctest = false
diff --git a/crates/search/Cargo.toml b/crates/search/Cargo.toml
index 8daa5e743ec..e54b5e0338c 100644
--- a/crates/search/Cargo.toml
+++ b/crates/search/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/search.rs"
doctest = false
diff --git a/crates/semantic_index/Cargo.toml b/crates/semantic_index/Cargo.toml
index 5c922a503ac..957a5e3cdf6 100644
--- a/crates/semantic_index/Cargo.toml
+++ b/crates/semantic_index/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/semantic_index.rs"
doctest = false
diff --git a/crates/settings/Cargo.toml b/crates/settings/Cargo.toml
index d9ad9d3f9ab..3177716196e 100644
--- a/crates/settings/Cargo.toml
+++ b/crates/settings/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/settings.rs"
doctest = false
diff --git a/crates/snippet/Cargo.toml b/crates/snippet/Cargo.toml
index c2c62cc01e0..f12c7dded35 100644
--- a/crates/snippet/Cargo.toml
+++ b/crates/snippet/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/snippet.rs"
doctest = false
diff --git a/crates/sqlez/Cargo.toml b/crates/sqlez/Cargo.toml
index 71c67af0950..98b05a06e4b 100644
--- a/crates/sqlez/Cargo.toml
+++ b/crates/sqlez/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
anyhow.workspace = true
collections.workspace = true
diff --git a/crates/sqlez_macros/Cargo.toml b/crates/sqlez_macros/Cargo.toml
index aab2596ddd1..969fe26c886 100644
--- a/crates/sqlez_macros/Cargo.toml
+++ b/crates/sqlez_macros/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/sqlez_macros.rs"
proc-macro = true
diff --git a/crates/story/Cargo.toml b/crates/story/Cargo.toml
index fc1754c253c..419a447c139 100644
--- a/crates/story/Cargo.toml
+++ b/crates/story/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
gpui.workspace = true
itertools = { package = "itertools", version = "0.10" }
diff --git a/crates/storybook/Cargo.toml b/crates/storybook/Cargo.toml
index caf66c4c4f7..38cc3ddc98d 100644
--- a/crates/storybook/Cargo.toml
+++ b/crates/storybook/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[[bin]]
name = "storybook"
path = "src/storybook.rs"
diff --git a/crates/sum_tree/Cargo.toml b/crates/sum_tree/Cargo.toml
index ac24e0d2989..b370e6df185 100644
--- a/crates/sum_tree/Cargo.toml
+++ b/crates/sum_tree/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[lib]
path = "src/sum_tree.rs"
doctest = false
diff --git a/crates/task/Cargo.toml b/crates/task/Cargo.toml
index 47f3170c743..8f4da57a635 100644
--- a/crates/task/Cargo.toml
+++ b/crates/task/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
anyhow.workspace = true
collections.workspace = true
diff --git a/crates/tasks_ui/Cargo.toml b/crates/tasks_ui/Cargo.toml
index cbf5280ef6f..446179890c1 100644
--- a/crates/tasks_ui/Cargo.toml
+++ b/crates/tasks_ui/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
anyhow.workspace = true
editor.workspace = true
diff --git a/crates/telemetry_events/Cargo.toml b/crates/telemetry_events/Cargo.toml
index 6893e7c1835..b202a60b251 100644
--- a/crates/telemetry_events/Cargo.toml
+++ b/crates/telemetry_events/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/telemetry_events.rs"
diff --git a/crates/terminal/Cargo.toml b/crates/terminal/Cargo.toml
index 884b754aacb..46862665573 100644
--- a/crates/terminal/Cargo.toml
+++ b/crates/terminal/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/terminal.rs"
doctest = false
diff --git a/crates/terminal_view/Cargo.toml b/crates/terminal_view/Cargo.toml
index 8daf4b3f028..d9e3606d4da 100644
--- a/crates/terminal_view/Cargo.toml
+++ b/crates/terminal_view/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/terminal_view.rs"
doctest = false
diff --git a/crates/text/Cargo.toml b/crates/text/Cargo.toml
index 798b506b5e2..4e57a784074 100644
--- a/crates/text/Cargo.toml
+++ b/crates/text/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/text.rs"
doctest = false
diff --git a/crates/theme/Cargo.toml b/crates/theme/Cargo.toml
index fff134af84a..0ead51ba410 100644
--- a/crates/theme/Cargo.toml
+++ b/crates/theme/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[features]
default = []
stories = ["dep:story"]
diff --git a/crates/theme_importer/Cargo.toml b/crates/theme_importer/Cargo.toml
index ddff83f385c..07ed1695bec 100644
--- a/crates/theme_importer/Cargo.toml
+++ b/crates/theme_importer/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
anyhow.workspace = true
clap = { workspace = true, features = ["derive"] }
diff --git a/crates/theme_selector/Cargo.toml b/crates/theme_selector/Cargo.toml
index 7e7e6fe9b64..3f9c9e62051 100644
--- a/crates/theme_selector/Cargo.toml
+++ b/crates/theme_selector/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/theme_selector.rs"
doctest = false
diff --git a/crates/time_format/Cargo.toml b/crates/time_format/Cargo.toml
index ea1fb336d56..1b5d36eb6c0 100644
--- a/crates/time_format/Cargo.toml
+++ b/crates/time_format/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/time_format.rs"
doctest = false
diff --git a/crates/ui/Cargo.toml b/crates/ui/Cargo.toml
index 1776f151d3d..3acae49d952 100644
--- a/crates/ui/Cargo.toml
+++ b/crates/ui/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
name = "ui"
path = "src/ui.rs"
diff --git a/crates/util/Cargo.toml b/crates/util/Cargo.toml
index 9725320507d..191d0beb565 100644
--- a/crates/util/Cargo.toml
+++ b/crates/util/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[lib]
path = "src/util.rs"
doctest = true
diff --git a/crates/vcs_menu/Cargo.toml b/crates/vcs_menu/Cargo.toml
index 3258c229dd8..786e2ee6fce 100644
--- a/crates/vcs_menu/Cargo.toml
+++ b/crates/vcs_menu/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
anyhow.workspace = true
fs.workspace = true
diff --git a/crates/vim/Cargo.toml b/crates/vim/Cargo.toml
index 071421e74e1..4a78547d1e0 100644
--- a/crates/vim/Cargo.toml
+++ b/crates/vim/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/vim.rs"
doctest = false
diff --git a/crates/welcome/Cargo.toml b/crates/welcome/Cargo.toml
index 2200db8bbde..6fd65c795e2 100644
--- a/crates/welcome/Cargo.toml
+++ b/crates/welcome/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/welcome.rs"
diff --git a/crates/workspace/Cargo.toml b/crates/workspace/Cargo.toml
index 44c6a988593..db8d004b9eb 100644
--- a/crates/workspace/Cargo.toml
+++ b/crates/workspace/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
path = "src/workspace.rs"
doctest = false
diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml
index 2ad94a8bae6..fe50da48845 100644
--- a/crates/zed/Cargo.toml
+++ b/crates/zed/Cargo.toml
@@ -6,6 +6,9 @@ version = "0.126.0"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[lib]
name = "zed"
path = "src/zed.rs"
diff --git a/crates/zed_actions/Cargo.toml b/crates/zed_actions/Cargo.toml
index 19c9415514e..ee279cde654 100644
--- a/crates/zed_actions/Cargo.toml
+++ b/crates/zed_actions/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
gpui.workspace = true
serde.workspace = true
diff --git a/extensions/gleam/Cargo.toml b/extensions/gleam/Cargo.toml
index b4167dd1cae..881978c90bf 100644
--- a/extensions/gleam/Cargo.toml
+++ b/extensions/gleam/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "Apache-2.0"
+[lints]
+workspace = true
+
[dependencies]
zed_extension_api = { path = "../../crates/extension_api" }
diff --git a/tooling/xtask/Cargo.toml b/tooling/xtask/Cargo.toml
index fac3b54e5e3..11f0036c74f 100644
--- a/tooling/xtask/Cargo.toml
+++ b/tooling/xtask/Cargo.toml
@@ -5,6 +5,9 @@ edition = "2021"
publish = false
license = "GPL-3.0-or-later"
+[lints]
+workspace = true
+
[dependencies]
anyhow.workspace = true
clap = { workspace = true, features = ["derive"] }
diff --git a/tooling/xtask/src/main.rs b/tooling/xtask/src/main.rs
index 44947a4367e..e4feb2bdb1e 100644
--- a/tooling/xtask/src/main.rs
+++ b/tooling/xtask/src/main.rs
@@ -63,57 +63,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
#[cfg(not(target_os = "windows"))]
clippy_command.args(["--deny", "warnings"]);
- /// These are all of the rules that currently have violations in the Zed
- /// codebase.
- ///
- /// We'll want to drive this list down by either:
- /// 1. fixing violations of the rule and begin enforcing it
- /// 2. deciding we want to allow the rule permanently, at which point
- /// we should codify that separately in this task.
- ///
- /// This list shouldn't be added to; it should only get shorter.
- const MIGRATORY_RULES_TO_ALLOW: &[&str] = &[
- // There are a bunch of rules currently failing in the `style` group, so
- // allow all of those, for now.
- "clippy::style",
- // Individual rules that have violations in the codebase:
- "clippy::almost_complete_range",
- "clippy::arc_with_non_send_sync",
- "clippy::await_holding_lock",
- "clippy::borrow_deref_ref",
- "clippy::borrowed_box",
- "clippy::cast_abs_to_unsigned",
- "clippy::cmp_owned",
- "clippy::derive_ord_xor_partial_ord",
- "clippy::eq_op",
- "clippy::implied_bounds_in_impls",
- "clippy::let_underscore_future",
- "clippy::map_entry",
- "clippy::never_loop",
- "clippy::non_canonical_clone_impl",
- "clippy::non_canonical_partial_ord_impl",
- "clippy::reversed_empty_ranges",
- "clippy::single_range_in_vec_init",
- "clippy::suspicious_to_owned",
- "clippy::type_complexity",
- "clippy::unnecessary_to_owned",
- ];
-
- // When fixing violations automatically for a single package we don't care
- // about the rules we're already violating, since it may be possible to
- // have them fixed automatically.
- let ignore_suppressed_rules = args.fix && args.package.is_some();
- if !ignore_suppressed_rules {
- for rule in MIGRATORY_RULES_TO_ALLOW {
- clippy_command.args(["--allow", rule]);
- }
- }
-
- // Deny `dbg!` and `todo!`s.
- clippy_command
- .args(["--deny", "clippy::dbg_macro"])
- .args(["--deny", "clippy::todo"]);
-
eprintln!(
"running: {cargo} {}",
clippy_command