postjevsql.git / build / lint.rs

Fails when a target's clippy report is not empty, printing it.

3fn main() {}
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}