keyhog-scanner 0.5.40

keyhog-scanner: high-performance SIMD-accelerated secret detection engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Shared filesystem path helpers for scanner integration tests.

use std::path::PathBuf;

/// Returns the absolute path to `crates/scanner/../detectors` (the on-disk Tier-B
/// detector TOML directory), computed from `CARGO_MANIFEST_DIR` so tests stay
/// stable across `cargo test`, `cargo nextest`, and remote runners that move cwd.
pub fn detector_dir() -> PathBuf {
    let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
    d.pop();
    d.pop();
    d.push("detectors");
    d
}