1//! Fails when a target's clippy report is not empty, printing it. 2 3fn main() {} 4 5#[test] 6fn clippy_is_clean() { 7 let path = std::env::var("LINT_REPORT").expect("LINT_REPORT is set by the lint target"); 8 let report = std::fs::read_to_string(&path).expect("the clippy report exists"); 9 assert!(report.trim().is_empty(), "clippy and rustc report:\n{report}"); 10}