MCPcopy Create free account
hub / github.com/bootc-dev/bootc / check_var_tmpfiles

Function check_var_tmpfiles

crates/lib/src/lints.rs:712–724  ·  view source on GitHub ↗
(_root: &Dir, config: &LintExecutionConfig)

Source from the content-addressed store, hash-verified

710.set_root_type(RootType::Running);
711
712fn check_var_tmpfiles(_root: &Dir, config: &LintExecutionConfig) -> LintResult {
713 let r = bootc_tmpfiles::find_missing_tmpfiles_current_root()?;
714 if r.tmpfiles.is_empty() && r.unsupported.is_empty() {
715 return lint_ok();
716 }
717 let mut msg = String::new();
718 let header = "Found content in /var missing systemd tmpfiles.d entries";
719 format_items(config, header, r.tmpfiles.iter().map(|v| v as &_), &mut msg)?;
720 let header = "Found non-directory/non-symlink files in /var";
721 let items = r.unsupported.iter().map(PathQuotedDisplay::new);
722 format_items(config, header, items, &mut msg)?;
723 lint_err(msg)
724}
725
726#[distributed_slice(LINTS)]
727static LINT_SYSUSERS: Lint = Lint::new_warning(

Callers

nothing calls this directly

Calls 6

lint_okFunction · 0.85
format_itemsFunction · 0.85
lint_errFunction · 0.85
is_emptyMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected