mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 05:29:20 +03:00
nixos/make-options-doc: treat missing descriptions as errors by default
this partially solves the problem of "missing description" warnings of the options doc build being lost by nix build, at the cost of failing builds that previously ran. an option to disable this behaviour is provided.
This commit is contained in:
parent
1301bdb185
commit
50954ad1c5
4 changed files with 43 additions and 8 deletions
|
@ -15,7 +15,7 @@ let
|
|||
f = import m;
|
||||
instance = f (mapAttrs (n: _: abort "evaluating ${n} for `meta` failed") (functionArgs f));
|
||||
in
|
||||
cfg.nixos.splitOptionDocBuild
|
||||
cfg.nixos.options.splitBuild
|
||||
&& builtins.isPath m
|
||||
&& isFunction f
|
||||
&& instance ? options
|
||||
|
@ -101,6 +101,7 @@ let
|
|||
exit 1
|
||||
} >&2
|
||||
'';
|
||||
inherit (cfg.nixos.options) warningsAreErrors;
|
||||
};
|
||||
|
||||
|
||||
|
@ -256,7 +257,7 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
nixos.splitOptionDocBuild = mkOption {
|
||||
nixos.options.splitBuild = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
|
@ -266,6 +267,15 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
nixos.options.warningsAreErrors = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Treat warning emitted during the option documentation build (eg for missing option
|
||||
descriptions) as errors.
|
||||
'';
|
||||
};
|
||||
|
||||
nixos.includeAllModules = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue