From 883269f1f183428f60c54223135d8dd25977b3cd Mon Sep 17 00:00:00 2001 From: Mathias Lafeldt Date: Thu, 11 Aug 2022 15:43:27 +0200 Subject: [PATCH] chore: move lint rules to cargo config for better editor integration (#15453) --- .cargo/config.toml | 12 ++++++++++++ tools/lint.js | 13 +------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index bb2ccd68bf..cac99a377e 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -12,3 +12,15 @@ rustflags = [ [target.aarch64-apple-darwin] rustflags = ["-C", "link-arg=-fuse-ld=lld"] + +[target.'cfg(all())'] +rustflags = [ + "-D", + "clippy::all", + "-D", + "clippy::await_holding_refcell_ref", + "-D", + "clippy::missing_safety_doc", + "-D", + "clippy::undocumented_unsafe_blocks", +] diff --git a/tools/lint.js b/tools/lint.js index ee438ed8be..62f73119f3 100755 --- a/tools/lint.js +++ b/tools/lint.js @@ -109,18 +109,7 @@ async function clippy() { } const { success } = await Deno.spawn("cargo", { - args: [ - ...cmd, - "--", - "-D", - "clippy::all", - "-D", - "clippy::await_holding_refcell_ref", - "-D", - "clippy::missing_safety_doc", - "-D", - "clippy::undocumented_unsafe_blocks", - ], + args: cmd, stdout: "inherit", stderr: "inherit", });