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

Function check_api_dirs

crates/lib/src/lints.rs:558–570  ·  view source on GitHub ↗
(root: &Dir, _config: &LintExecutionConfig)

Source from the content-addressed store, hash-verified

556 check_api_dirs,
557);
558fn check_api_dirs(root: &Dir, _config: &LintExecutionConfig) -> LintResult {
559 for d in API_DIRS {
560 let Some(meta) = root.symlink_metadata_optional(d)? else {
561 return lint_err(format!("Missing API filesystem base directory: /{d}"));
562 };
563 if !meta.is_dir() {
564 return lint_err(format!(
565 "Expected directory for API filesystem base directory: /{d}"
566 ));
567 }
568 }
569 lint_ok()
570}
571
572#[distributed_slice(LINTS)]
573static LINT_COMPOSEFS: Lint = Lint::new_warning(

Callers 1

test_apiFunction · 0.85

Calls 2

lint_errFunction · 0.85
lint_okFunction · 0.85

Tested by 1

test_apiFunction · 0.68