Expand description
The LanguagePlugin trait + its PluginInput.
A plugin turns a workspace into nodes + edges at a requested level
(analyze) and measures the per-file complexity
metrics for its own language (metrics), returning
the raw MetricInputs for the orchestrator to
write. Measuring is a per-language concern — each plugin parses its own files
with its own grammar and engine — so there is no central, by-extension metric
dispatcher; but the writing (tier-2 derivation + node enrichment) and the
language-agnostic derived data (cycles, Henry-Kafura, stats) are filled
centrally by the orchestrator, so a plugin needs no dependency on the
graph/enrichment crate. Plugins SELF-REGISTER via inventory::submit! into
the registry; the CLI works only with that array through this trait and
never names a concrete language.
Structs§
- Plugin
Input - Everything the orchestrator feeds a plugin from config + CLI input.
- Plugin
Registration - A self-registered language plugin. Each plugin in the plugins crate submits one
via
inventory::submit!; the binary’s registry is assembled by the linker, so NO central code lists the plugins and no caller (the CLI) ever names a language. Plugins are zero-sized unit structs, so a&'staticreference is free.
Traits§
Functions§
- registry
- Every self-registered language plugin. The CLI works only through this array
and the
LanguagePlugintrait — it never names a concrete language.