standarbuild-detect 0.2.0

Detect project kind (Rust, Node, Bun, Deno, Python, Lua, C/C++) and scan polyglot monorepo workspaces
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Convenience entry point: build a built-in registry on the fly and run a
//! single detection. For repeated calls, build a [`DetectorRegistry`] once
//! and reuse it.

use std::path::Path;

use crate::detector::{DetectMatch, DetectorRegistry};

pub fn detect_in_dir(dir: &Path) -> Option<DetectMatch> {
	DetectorRegistry::with_builtins().detect(dir)
}