Skip to main content

Module discover

Module discover 

Source
Expand description

Finding a ledger’s root journal without being told where it is.

Both the language server and rledger format need this: neither is handed a root, but both must resolve options (render_commas, per-commodity declarations) that only exist there. The list of names lives here so the two cannot disagree about what a root looks like — a file the LSP formats one way and the CLI another is precisely the failure this is meant to prevent.

Constants§

COMMON_ROOT_NAMES
Common root journal filenames, in priority order.

Functions§

discover_journal_file
The root journal directly inside dir, if one is there.
discover_journal_upward
The nearest root journal at or above start.