Skip to content

Commit e43b3df

Browse files
committed
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.
1 parent 1146f66 commit e43b3df

1 file changed

Lines changed: 13 additions & 17 deletions

File tree

run-rust-clippy.sh

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22

33
set -euo pipefail
44

5-
default_lints=(
6-
"-D rust_2018_idioms"
7-
"-D missing_debug_implementations"
8-
"-D unreachable_pub"
9-
"-D missing_docs"
10-
"-A clippy::missing_docs_in_private_items"
11-
"-D clippy::doc_markdown"
12-
"-D clippy::todo"
13-
"-D clippy::dbg_macro"
14-
"-D clippy::unimplemented"
15-
"-D clippy::await_holding_lock"
16-
"-D clippy::match-like-matches-macro"
17-
)
5+
# Some sensible defaults:
6+
# "-D rust_2018_idioms"
7+
# "-D missing_debug_implementations"
8+
# "-D unreachable_pub"
9+
# "-D missing_docs"
10+
# "-A clippy::missing_docs_in_private_items"
11+
# "-D clippy::doc_markdown"
12+
# "-D clippy::todo"
13+
# "-D clippy::dbg_macro"
14+
# "-D clippy::unimplemented"
15+
# "-D clippy::await_holding_lock"
16+
# "-D clippy::match-like-matches-macro"
1817

19-
# Use the lints passed as arguments, or the default above.
20-
lints=${*:-${default_lints[*]}}
21-
22-
cargo clippy --all-targets --all-features -- -D warnings ${lints}
18+
cargo clippy --all-targets --all-features -- -D warnings "$@"

0 commit comments

Comments
 (0)