Adds `expect()` as a denied lint. Same deal applies with `unwrap()` where we now need to put `#[expect(...` on ones that we legit want. Took care to enable `expect()` in test contexts. # Tests ``` cargo fmt cargo clippy --all-features --all-targets --no-deps -- -D warnings cargo test ```
11 lines
397 B
Rust
11 lines
397 B
Rust
#![expect(clippy::expect_used)]
|
|
use codex_execpolicy::NegativeExamplePassedCheck;
|
|
use codex_execpolicy::get_default_policy;
|
|
|
|
#[test]
|
|
fn verify_everything_in_bad_list_is_rejected() {
|
|
let policy = get_default_policy().expect("failed to load default policy");
|
|
let violations = policy.check_each_bad_list_individually();
|
|
assert_eq!(Vec::<NegativeExamplePassedCheck>::new(), violations);
|
|
}
|