Files
llmx/codex-rs/execpolicy/tests/bad.rs
jcoens-openai f3bd143867 Disallow expect via lints (#865)
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
```
2025-05-12 08:45:46 -07:00

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);
}