hexpm/ldoc0.1.0ldoc

ldoc-analysis

Validate a stored native docset and project a deterministic presentation view, optionally deriving lexical relative source references.

valid-options?/1function

valid-options?/1

Return whether OPTIONS is accepted by view/2.

Only an empty map or a map containing source_root is valid. The root must be an absolute valid UTF-8 path without dot or dot-dot components. This predicate does not inspect files.

view/1function

view/1

Project DOCSET into the default native analysis view without source references.

Success returns {ok, View}; an invalid docset returns {error, invalid_docset}. The view groups languages, modules, and visible definitions deterministically, retains supported native kinds, excludes internal entries, and preserves documentation state. It performs no file IO or target loading.

view/2function

view/2

Project DOCSET through the selected native presentation fields.

OPTIONS is empty or contains only source_root, an absolute valid UTF-8 path without dot components. Options are checked before docset validation. Groups and identities are sorted; internal entries are excluded, hidden modules remain but suppress definitions and source, and hidden definition docs remain represented. Signatures and patterns are selected producer fields, not pretty-printed raw typed specs. A source reference is emitted only from recorded provenance that provides a source path lexically beneath the declared root. A line is included only when a known positive line is available; it is optional. No filesystem, symlink, existence, or authenticity check occurs. Returns {ok, View}, {error, invalid_options}, or {error, invalid_docset}.