Skip to content

Commit 9742315

Browse files
committed
Add clippy lints to limit panics
1 parent baf6723 commit 9742315

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,10 @@ jobs:
150150
- name: cargo test
151151
run: cargo hack --feature-powerset --exclude-features defmt test --all-targets --locked
152152
# After ensuring tests pass, finally ensure the test code itself contains no clippy warnings
153+
# Cap lints to avoid complaints about possible panics in our tests
153154
- name: cargo clippy
154155
run: |
155-
cargo clippy --locked --tests
156+
cargo clippy --locked --tests -- --cap-lints allow
156157
157158
msrv:
158159
# check that we can build using the minimal rust version that is specified by this crate

Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@ aquamarine = "0.6.0"
1313
[features]
1414
default = []
1515
defmt = ["dep:defmt"]
16+
17+
[lints.clippy]
18+
correctness = "deny"
19+
expect_used = "deny"
20+
indexing_slicing = "deny"
21+
panic = "deny"
22+
panic_in_result_fn = "deny"
23+
perf = "deny"
24+
suspicious = "deny"
25+
style = "deny"
26+
todo = "deny"
27+
unimplemented = "deny"
28+
unreachable = "deny"
29+
unwrap_used = "deny"

0 commit comments

Comments
 (0)