You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(config): accept every config key a rule actually reads
Config validation read `default_config_section()`, the same table that backs
`rumdl config --defaults` and `rumdl explain`. That table is a listing of
defaults, so a key whose default cannot be written down is absent from it: an
unset `Option` has no value a user could copy, and inventing one would read as
a real setting. Those keys were therefore rejected as "Unknown option" even
though the rule deserialized and honored them. MD001's
`front-matter-title-pattern` worked and was warned about on every run.
Validation now reads a separate `Rule::config_schema()`, derived from the same
struct `from_config` deserializes, so the accepted keys cannot drift from the
honored ones. A key with no representable default carries a sentinel there: the
name is recognized while its type check is skipped. Sentinels contain a NUL
byte and are unwritable as TOML, which is what keeps them out of the listing.
The two halves are pinned against each other rather than spot-checked: every
published default must be accepted by the validator, every schema key must
survive a real load-and-validate, no user-facing table may carry a sentinel,
and `rumdl config --defaults` must produce a config rumdl itself accepts.
Reported in #794.
0 commit comments