rebar3_erli18n_prv_check (rebar3_erli18n v0.1.0)

Copy Markdown View Source

rebar3 erli18n check — fail the build when the .pot templates are stale.

This is the mix gettext --check-up-to-date experience for Erlang: it re-extracts the project and compares the result against the committed .pot files. By DEFAULT it detects FULL drift — both the msgid set AND the #: references — so a moved or renamed call site is caught, matching the Elixir behaviour. The laxer --names-only mode compares only the msgid set (stable against pure line-churn) for teams that find reference drift noisy.

Because extraction is literal-only, a legitimately dynamic (non-literal) key is never extracted into the .pot in the first place, so it can never produce a false drift failure in either mode — the dynamic-key guarantee.

Summary

Functions

Run the freshness check; error (non-zero exit) on drift.

Render a provider error to a human string.

Register the check provider under the erli18n namespace.

Functions

do(State)

-spec do(rebar3_erli18n_host:state()) -> {ok, rebar3_erli18n_host:state()} | {error, string()}.

Run the freshness check; error (non-zero exit) on drift.

format_error(Reason)

-spec format_error(term()) -> string().

Render a provider error to a human string.

init(State)

Register the check provider under the erli18n namespace.