lib/options: Throw error for options without a type

Makes all options rendered in the manual throw an error if they don't
have a type specified.

This is a follow-up to #76184

Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
This commit is contained in:
Janne Heß 2021-06-16 12:27:47 +02:00 committed by Silvan Mosberger
parent b2d803ca57
commit 0c766a100e
4 changed files with 18 additions and 8 deletions

View file

@ -231,7 +231,7 @@ rec {
then true
else opt.visible or true;
readOnly = opt.readOnly or false;
type = opt.type.description or null;
type = opt.type.description or "unspecified";
}
// optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; }
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; }