Skip to content

Commit 2bb53d8

Browse files
authored
move all clippy lints into [lints.clippy] table (#1083)
Co-authored-by: David Hewitt <[email protected]>
1 parent 14c2971 commit 2bb53d8

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

Cargo.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,30 @@ pyo3-build-config = { version = "0.20.0" }
7979
[lints.clippy]
8080
dbg_macro = "warn"
8181
print_stdout = "warn"
82+
83+
# in general we lint against the pedantic group, but we will whitelist
84+
# certain lints which we don't want to enforce (for now)
85+
pedantic = { level = "warn", priority = -1 }
86+
cast_possible_truncation = "allow"
87+
cast_possible_wrap = "allow"
88+
cast_precision_loss = "allow"
89+
cast_sign_loss = "allow"
90+
doc_markdown = "allow"
91+
float_cmp = "allow"
92+
fn_params_excessive_bools = "allow"
93+
if_not_else = "allow"
94+
manual_let_else = "allow"
95+
match_bool = "allow"
96+
match_same_arms = "allow"
97+
missing_errors_doc = "allow"
98+
missing_panics_doc = "allow"
99+
module_name_repetitions = "allow"
100+
must_use_candidate = "allow"
101+
needless_pass_by_value = "allow"
102+
similar_names = "allow"
103+
single_match_else = "allow"
104+
struct_excessive_bools = "allow"
105+
too_many_lines = "allow"
106+
unnecessary_wraps = "allow"
107+
unused_self = "allow"
108+
used_underscore_binding = "allow"

Makefile

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -106,32 +106,7 @@ lint-rust:
106106
cargo fmt --version
107107
cargo fmt --all -- --check
108108
cargo clippy --version
109-
cargo clippy --tests -- \
110-
-D warnings \
111-
-W clippy::pedantic \
112-
-A clippy::cast-possible-truncation \
113-
-A clippy::cast-possible-wrap \
114-
-A clippy::cast-precision-loss \
115-
-A clippy::cast-sign-loss \
116-
-A clippy::doc-markdown \
117-
-A clippy::float-cmp \
118-
-A clippy::fn-params-excessive-bools \
119-
-A clippy::if-not-else \
120-
-A clippy::manual-let-else \
121-
-A clippy::match-bool \
122-
-A clippy::match-same-arms \
123-
-A clippy::missing-errors-doc \
124-
-A clippy::missing-panics-doc \
125-
-A clippy::module-name-repetitions \
126-
-A clippy::must-use-candidate \
127-
-A clippy::needless-pass-by-value \
128-
-A clippy::similar-names \
129-
-A clippy::single-match-else \
130-
-A clippy::struct-excessive-bools \
131-
-A clippy::too-many-lines \
132-
-A clippy::unnecessary-wraps \
133-
-A clippy::unused-self \
134-
-A clippy::used-underscore-binding
109+
cargo clippy --tests -- -D warnings
135110

136111
.PHONY: lint
137112
lint: lint-python lint-rust

0 commit comments

Comments
 (0)