From e43b3dfbd8bd86601ba757c9cb6ce0567489c778 Mon Sep 17 00:00:00 2001 From: Dom Date: Mon, 4 Jan 2021 16:28:34 +0000 Subject: [PATCH] rust-clippy: remove default lints Removes the default lints from the clippy exec. Users should instead prefer to define them in source, or explicitly as args. Previously defining them in the source was then overridden by the args, which was confusing and produced the wrong results. --- run-rust-clippy.sh | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/run-rust-clippy.sh b/run-rust-clippy.sh index a27dd2c..1110921 100755 --- a/run-rust-clippy.sh +++ b/run-rust-clippy.sh @@ -2,21 +2,17 @@ set -euo pipefail -default_lints=( - "-D rust_2018_idioms" - "-D missing_debug_implementations" - "-D unreachable_pub" - "-D missing_docs" - "-A clippy::missing_docs_in_private_items" - "-D clippy::doc_markdown" - "-D clippy::todo" - "-D clippy::dbg_macro" - "-D clippy::unimplemented" - "-D clippy::await_holding_lock" - "-D clippy::match-like-matches-macro" -) +# Some sensible defaults: +# "-D rust_2018_idioms" +# "-D missing_debug_implementations" +# "-D unreachable_pub" +# "-D missing_docs" +# "-A clippy::missing_docs_in_private_items" +# "-D clippy::doc_markdown" +# "-D clippy::todo" +# "-D clippy::dbg_macro" +# "-D clippy::unimplemented" +# "-D clippy::await_holding_lock" +# "-D clippy::match-like-matches-macro" -# Use the lints passed as arguments, or the default above. -lints=${*:-${default_lints[*]}} - -cargo clippy --all-targets --all-features -- -D warnings ${lints} \ No newline at end of file +cargo clippy --all-targets --all-features -- -D warnings "$@" \ No newline at end of file