Expand description
Lightweight warning system for hyalo CLI.
Provides:
- Quiet mode: suppress all warnings when
-q/--quietis set. - Dedup tracking: identical warning messages are counted but only
printed once;
flush_summary()reports how many were suppressed.
§Initialisation
Call init(quiet) as early as possible after CLI flags are parsed.
Until init is called the system defaults to non-quiet mode, so any
warnings emitted before initialisation (e.g. from config loading) are
still printed.
§Usage
ⓘ
warn::init(cli.quiet);
// ...
warn::warn("skipping foo.md: invalid frontmatter");
// ...
warn::flush_summary();Functions§
- flush_
summary - Print a summary of suppressed duplicate warnings, if any.
- init
- Initialise the warning system.
- warn
- Emit a warning message to stderr.
- warn_
glob_ dir_ overlap - Emit a “did you mean…” warning when globs matched zero files and the glob
pattern appears to redundantly include the configured
--dirpath.