1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Killer — a fast, extensible code quality and security analysis engine.
//!
//! This library crate exposes the analysis engine so it can be embedded and
//! tested independently of the `killer` command-line binary.
//!
//! # Overview
//!
//! - [`scanner`] walks a directory, detects languages, and loads file contents.
//! - [`analyzer`] defines the [`analyzer::Rule`] trait and runs rules over files.
//! - [`rules`] contains the built-in security and quality rules.
//! - [`report`] turns findings into a scored, terminal-friendly report.
//! - [`config`] loads `.killer.toml` settings.
//!
//! # Example
//!
//! ```no_run
//! use std::path::Path;
//! use killer::{analyzer::Analyzer, config::Config, report::Report, scanner};
//!
//! let root = Path::new(".");
//! let config = Config::load(root).unwrap();
//! let scan = scanner::scan(root, &config);
//! let findings = Analyzer::with_default_rules(&config).analyze(&scan);
//! let report = Report::new("demo".into(), scan.stats, findings);
//! print!("{}", report.render_terminal());
//! ```