pub mod ast;
pub mod binary;
pub(crate) mod comment_strip;
pub mod cve;
pub mod dataflow;
pub mod deptree;
pub mod diff;
pub mod hallucination;
pub mod install_scripts;
pub mod maintainer;
pub mod obfuscation;
pub mod provenance;
pub mod static_code;
use crate::types::{AnalysisContext, Finding};
pub trait Analyzer: Send + Sync {
fn name(&self) -> &str;
fn analyze(&self, ctx: &AnalysisContext) -> Vec<Finding>;
}
pub(crate) fn truncate(s: &str, max: usize) -> String {
let trimmed = s.trim();
if trimmed.chars().count() <= max {
trimmed.to_string()
} else {
let truncated: String = trimmed.chars().take(max).collect();
format!("{truncated}...")
}
}