diff options
author | Mathias Lafeldt <mathias.lafeldt@gmail.com> | 2022-08-11 15:43:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 19:13:27 +0530 |
commit | 883269f1f183428f60c54223135d8dd25977b3cd (patch) | |
tree | 775a352e68fb85292861a92bd267b9b41fc33d74 | |
parent | 25a1cc1b28ee2f37deb6305c0feb66d4eec50804 (diff) |
chore: move lint rules to cargo config for better editor integration (#15453)
-rw-r--r-- | .cargo/config.toml | 12 | ||||
-rwxr-xr-x | tools/lint.js | 13 |
2 files changed, 13 insertions, 12 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml index bb2ccd68b..cac99a377 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 ee438ed8b..62f73119f 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", }); |