about summary refs log tree commit diff
path: root/nixos/doc/manual
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2022-03-16 22:58:45 +0100
committerGitHub <noreply@github.com>2022-03-16 22:58:45 +0100
commit0395086d0c2bb189f03985486a23cfedbdf8c940 (patch)
tree621948aafdf70a1adc44b344ab93650bef22cc50 /nixos/doc/manual
parent2f7633c22ee80c72a206421abcd5fc1a208bf946 (diff)
parent0c766a100e416611807a184ee35a0edbd11b15a4 (diff)
Merge pull request #162271 from Infinisil/warn-no-type
Throw an error for options without a type
Diffstat (limited to 'nixos/doc/manual')
-rw-r--r--nixos/doc/manual/development/option-declarations.section.md7
-rw-r--r--nixos/doc/manual/from_md/development/option-declarations.section.xml8
2 files changed, 9 insertions, 6 deletions
diff --git a/nixos/doc/manual/development/option-declarations.section.md b/nixos/doc/manual/development/option-declarations.section.md
index 819fc6d891f00..53ecb9b3a6248 100644
--- a/nixos/doc/manual/development/option-declarations.section.md
+++ b/nixos/doc/manual/development/option-declarations.section.md
@@ -27,9 +27,10 @@ The function `mkOption` accepts the following arguments.
 
 `type`
 
-:   The type of the option (see [](#sec-option-types)). It may be
-    omitted, but that's not advisable since it may lead to errors that
-    are hard to diagnose.
+:   The type of the option (see [](#sec-option-types)). This
+    argument is mandatory for nixpkgs modules. Setting this is highly
+    recommended for the sake of documentation and type checking. In case it is
+    not set, a fallback type with unspecified behavior is used.
 
 `default`
 
diff --git a/nixos/doc/manual/from_md/development/option-declarations.section.xml b/nixos/doc/manual/from_md/development/option-declarations.section.xml
index 554705e2e4249..0ac5e0eeca2da 100644
--- a/nixos/doc/manual/from_md/development/option-declarations.section.xml
+++ b/nixos/doc/manual/from_md/development/option-declarations.section.xml
@@ -38,9 +38,11 @@ options = {
       <listitem>
         <para>
           The type of the option (see
-          <xref linkend="sec-option-types" />). It may be omitted, but
-          that’s not advisable since it may lead to errors that are hard
-          to diagnose.
+          <xref linkend="sec-option-types" />). This argument is
+          mandatory for nixpkgs modules. Setting this is highly
+          recommended for the sake of documentation and type checking.
+          In case it is not set, a fallback type with unspecified
+          behavior is used.
         </para>
       </listitem>
     </varlistentry>