Skip to content

Commit

Permalink
Automated rfc145 migration for comments into doc-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 17, 2024
1 parent a2472aa commit 6034443
Show file tree
Hide file tree
Showing 14 changed files with 1,439 additions and 619 deletions.
11 changes: 6 additions & 5 deletions lib/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* Library of low-level helper functions for nix expressions.
*
* Please implement (mostly) exhaustive unit tests
* for new functions in `./tests.nix`.
*/
/**
Library of low-level helper functions for nix expressions.
*
* Please implement (mostly) exhaustive unit tests
* for new functions in `./tests.nix`.
*/
let

inherit (import ./fixed-points.nix { inherit lib; }) makeExtensible;
Expand Down
38 changes: 34 additions & 4 deletions lib/fileset/internal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ rec {
# Set all entries not present to null
mapAttrs (name: value: null) (readDir path) // value;

/*
/**
A normalisation of a filesetTree suitable filtering with `builtins.path`:
- Replace all directories that have no files with `null`.
This removes directories that would be empty
Expand All @@ -276,7 +276,22 @@ rec {
Note that this function is strict, it evaluates the entire tree
Type: Path -> filesetTree -> filesetTree
# Inputs
`path`
: 1\. Function argument
`tree`
: 2\. Function argument
# Type
```
Path -> filesetTree -> filesetTree
```
*/
_normaliseTreeFilter =
path: tree:
Expand All @@ -298,7 +313,7 @@ rec {
else
tree;

/*
/**
A minimal normalisation of a filesetTree, intended for pretty-printing:
- If all children of a path are recursively included or empty directories, the path itself is also recursively included
- If all children of a path are fully excluded or empty directories, the path itself is an empty directory
Expand All @@ -307,7 +322,22 @@ rec {
Note that this function is partially lazy.
Type: Path -> filesetTree -> filesetTree (with "emptyDir"'s)
# Inputs
`path`
: 1\. Function argument
`tree`
: 2\. Function argument
# Type
```
Path -> filesetTree -> filesetTree (with "emptyDir"'s)
```
*/
_normaliseTreeMinimal =
path: tree:
Expand Down
13 changes: 8 additions & 5 deletions lib/licenses.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ let

in
lib.mapAttrs mkLicense ({
/* License identifiers from spdx.org where possible.
* If you cannot find your license here, then look for a similar license or
* add it to this list. The URL mentioned above is a good source for inspiration.
*/
/**
License identifiers from spdx.org where possible.
* If you cannot find your license here, then look for a similar license or
* add it to this list. The URL mentioned above is a good source for inspiration.
*/

abstyles = {
spdxId = "Abstyles";
Expand All @@ -37,7 +38,9 @@ lib.mapAttrs mkLicense ({
acsl14 = {
fullName = "Anti-Capitalist Software License v1.4";
url = "https://anticapitalist.software/";
/* restrictions on corporations apply for both use and redistribution */
/**
restrictions on corporations apply for both use and redistribution
*/
free = false;
redistributable = false;
};
Expand Down
Loading

0 comments on commit 6034443

Please sign in to comment.