From 15944af12e5136d30deae7926db39664b3141d42 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 14 Jan 2025 13:03:35 +0000 Subject: [PATCH] deploy: 9142a5b9dd7dacf54825d2fcd730604457535ebc --- index.xhtml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/index.xhtml b/index.xhtml index 31fd0ac2..451c1e67 100644 --- a/index.xhtml +++ b/index.xhtml @@ -708,12 +708,9 @@ to double check your changes before making your pull request in order to avoid “faulty” code slipping by.

If you are uncertain how these rules affect the change you would like to make then feel free to start a discussion in the discussions tab ideally (but not -necessarily) before you start developing.

Adding Documentation

Most, if not all, changes warrant changes to the documentation. Module options -should be documented with -Nixpkgs-flavoured Markdown, -albeit with exceptions.

::: {.note} As of v0.5, nvf is itself documented using full markdown in -both module options and the manual. With v0.6, this manual has also been -converted to markdown in full. :::

The HTML version of this manual containing both the module option descriptions +necessarily) before you start developing.

Adding Documentation

Almost all changes warrant updates to the documentation: at the very least, you +must update the changelog. Both the manual and module options use +Nixpkgs Flavoured Markdown.

The HTML version of this manual containing both the module option descriptions and the documentation of nvf (such as this page) can be generated and opened by typing the following in a shell within a clone of the nvf Git repository:

$ nix build .#docs-html
 $ xdg-open $PWD/result/share/doc/nvf/index.html
@@ -763,10 +760,9 @@ description if you wish.

In case of nested modules, i.e languages/java: some major change.

Code Style

Treewide

Keep lines at a reasonable width, ideally 80 characters or less. This also applies to string literals and module descriptions and documentation.

-

Nix

nvf is formatted by the -alejandra tool and the formatting is -checked in the pull request and push workflows. Run the nix fmt command inside -the project repository before submitting your pull request.

While Alejandra is mostly opinionated on how code looks after formatting, +

Nix

nvf is formatted by the alejandra tool and the formatting is checked in +the pull request and push workflows. Run the nix fmt command inside the +project repository before submitting your pull request.

While Alejandra is mostly opinionated on how code looks after formatting, certain changes are done at the user’s discretion based on how the original code was structured.

Please use one line code for attribute sets that contain only one subset. For example:

# parent modules should always be unfolded
@@ -777,10 +773,14 @@ module = {
     # same as parent modules, unfold submodules
     subModule = {
         # this is an option that contains more than one nested value
+        # Note: try to be careful about the ordering of `mkOption` arguments.
+        # General rule of thumb is to order from least to most likely to change.
+        # This is, for most cases, type < default < description.
+        # Example, if present, would be between default and description
         someOtherValue = mkOption {
             type = lib.types.bool;
-            description = "Some other description";
             default = true;
+            description = "Some other description";
         };
     };
 }