From f2142d4812a94b6462682e55dba6dd3efa904f10 Mon Sep 17 00:00:00 2001 From: Jan Pikl Date: Fri, 29 Mar 2024 19:39:26 +0100 Subject: [PATCH] Configure clippy inside Cargo.toml --- .vscode/settings.json | 6 ------ Cargo.toml | 6 ++++++ Justfile | 6 +----- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 01833a6..a8dac9a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,12 +1,6 @@ { "editor.formatOnSave": true, "rust-analyzer.check.command": "clippy", - "rust-analyzer.check.extraArgs": [ - "--", - "-W", "clippy::pedantic", - "-A", "clippy::module_name_repetitions", - "-A", "clippy::must_use_candidate", - ], "rust-analyzer.rustfmt.extraArgs": ["+nightly"], "shellcheck.customArgs": [ "--external-sources", diff --git a/Cargo.toml b/Cargo.toml index baaf058..20714dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,3 +51,9 @@ codegen-units = 1 panic = "abort" strip = true lto = true + +[lints.clippy] +all = "deny" +pedantic = "deny" +module_name_repetitions = "allow" +must_use_candidate = "allow" diff --git a/Justfile b/Justfile index 62d8b46..7257c95 100644 --- a/Justfile +++ b/Justfile @@ -36,11 +36,7 @@ format *ARGS: # Run clippy clippy: - cargo clippy --workspace -- \ - -D clippy::all \ - -D clippy::pedantic \ - -A clippy::module_name_repetitions \ - -A clippy::must_use_candidate + cargo clippy --workspace # Run tests test: