Skip to main content

check

Function check 

Source
pub fn check(manifest_path: &Path) -> (usize, Vec<Report>)
Expand description

Loads manifest_path and turns every guicons_core::ManifestError (real errors - manifest shape is wrong) plus two filesystem-level checks guicons_core itself deliberately doesn’t do (it only validates shape, not what fields point to) into pretty-printable miette::Reports:

  • a file source pointing at a path that doesn’t exist - a real error, since nothing will ever be able to load it.
  • an iconify = "provider:name" source with no cached SVG on disk yet - only advice (informational, not a warning/error), since resolving it for real needs network access (icons fetch) that check deliberately never does itself; not being cached yet doesn’t mean the id is wrong, just unconfirmed.

windows-ico is deliberately not checked here (narrower, Windows-only concern; left to guicons-lsp’s existing editor-side check).

Returns the number of entries that parsed successfully alongside the reports (empty if the manifest is fully valid, though it may still contain advice-level notes - see Severity on each report).