in kernel-compliance-check/src/main.rs [8:52]
fn main() -> Result<()> {
// Parse CLI arguments
let cli = Cli::parse();
// Respect KERNELS_CACHE if set
let non_standard_cache: Option<String> = std::env::var("KERNELS_CACHE").ok();
// Prefer the cli unless explicitly set to avoid it
let prefer_hub_cli = !std::env::var("AVOID_HUB_CLI")
.map(|v| v == "1" || v == "true")
.unwrap_or(false);
match cli.command {
Commands::Check {
repos,
manylinux,
python_abi,
revision,
long,
force_fetch,
show_violations,
format,
} => {
eprintln!("Running kernel compliance check");
eprintln!("Repositories: {repos}");
eprintln!("Kernel Revision: {revision}");
// Check repositories for compliance
check_repositories(
&repos,
&manylinux.to_string(),
&python_abi,
prefer_hub_cli,
force_fetch,
&revision,
long,
show_violations,
format,
non_standard_cache.as_ref(),
)?;
}
}
Ok(())
}