Skip to main content

Crate dead_poets

Crate dead_poets 

Source
Expand description

dead-poets — find unused (dead) gettext PO keys across a polyglot codebase.

Reusable library behind a standalone CLI. Pipeline of small modules: configpo (key universe) → decode (literal vs guard) → extract (per-language adapters) → guardlivenessreport.

Everything project-specific lives in dead-poets.toml; the engine knows nothing about any particular repository.

Scope: the key universe source is gettext .po/.pot only. The reference side is polyglot (PHP, Twig, JS/TS), but JSON/YAML/.properties/ .arb i18n catalogs (react-i18next, vue-i18n, Rails, Flutter) are out of scope by design.

Library consumers call run for the whole pipeline; see engine.

Re-exports§

pub use engine::Outcome;
pub use engine::run;

Modules§

audit
Dead-bucket audit — an opt-in trust score over the Dead list.
budget
Dead-key budget (ratchet) — the type, its gate semantics, and resolution.
cli
Command-line interface (clap derive).
config
Configuration model (dead-poets.toml).
decode
Literal decoding — the single “plain literal vs guard” decision point.
engine
Library entry point — config file in, classification out, behind one call.
extract
Extractor — per-language adapters behind one invariant driver.
guard
Guard layer — the central correctness invariant.
liveness
Liveness classification.
po
PO key universe — the set of keys we check for liveness.
report
Reporter — render the liveness result and decide the process exit code.
scan
Source scanning — walk the roots and extract usage in parallel.
walk
File discovery — the one walk policy shared by source scanning, PO collection, and the audit pass.