Skip to main content

dead_poets/
lib.rs

1//! dead-poets — find unused (dead) gettext PO keys across a polyglot codebase.
2//!
3//! Reusable library behind a standalone CLI. Pipeline of small modules:
4//! `config` → `po` (key universe) → `decode` (literal vs guard) →
5//! `extract` (per-language adapters) → `guard` → `liveness` → `report`.
6//!
7//! Everything project-specific lives in `dead-poets.toml`; the engine knows
8//! nothing about any particular repository.
9//!
10//! **Scope:** the key universe source is **gettext `.po`/`.pot` only**. The
11//! reference side is polyglot (PHP, Twig, JS/TS), but JSON/YAML/`.properties`/
12//! `.arb` i18n catalogs (react-i18next, vue-i18n, Rails, Flutter) are out of
13//! scope by design.
14//!
15//! Library consumers call [`run`] for the whole pipeline; see [`engine`].
16
17pub mod audit;
18pub mod budget;
19pub mod config;
20pub mod decode;
21pub mod engine;
22pub mod extract;
23pub mod guard;
24pub mod liveness;
25pub mod po;
26pub mod scan;
27pub mod walk;
28
29pub use engine::{Outcome, run};
30
31// CLI front-end: argument parsing (`clap`) and terminal/JSON rendering
32// (`colored` / `serde_json`). Gated behind the `cli` feature so library
33// consumers of the classifier do not pull in terminal dependencies; the
34// `dead-poets` binary requires it.
35#[cfg(feature = "cli")]
36pub mod cli;
37#[cfg(feature = "cli")]
38pub mod report;