Clippy is ignoring directives unless in the current file/module. E.g. using #![deny(clippy::print_stdout)] in lib.rs and then putting a println!() call in another module does not trigger the lint? Minimal reproducer 4 comments down in thread.
I can't reproduce this in a simple program. For example, running Clippy on this file produces an error:
#![deny(clippy::print_stdout)]
mod foo {
fn bar() {
println!("");
}
}
Are you perhaps including the same file in multiple crates? For example, do you have lib.rs and main.rs that both say mod foo;? (If so, you should include this modilue only in your library crate, and use it in your binary crate via the library.)