1
2
3
4
5
6
7
8
9
10
11
12
13
pub fn skip_kernel_compilation() -> bool {
    let mut skip_compilation = false;

    if let Ok(rustc) = proc_macro::tracked_env::var("RUSTC_WRAPPER") {
        skip_compilation |= rustc.contains("clippy-driver");
    }

    if let Ok(rustc) = proc_macro::tracked_env::var("RUSTC_WORKSPACE_WRAPPER") {
        skip_compilation |= rustc.contains("clippy-driver");
    }

    skip_compilation
}