treewide: apply linter suggestions
This commit is contained in:
parent
aca6fcdaff
commit
1d333fc92e
39 changed files with 54 additions and 59 deletions
|
|
@ -25,10 +25,10 @@ let
|
|||
builtins.concatMap (
|
||||
node:
|
||||
let
|
||||
children = builtins.removeAttrs node [ "_page" ];
|
||||
children = removeAttrs node [ "_page" ];
|
||||
in
|
||||
lib.optional (node ? _page) node._page ++ lib.optionals (children != { }) (collectPages children)
|
||||
) (builtins.attrValues (builtins.removeAttrs pages [ "_category" ]));
|
||||
) (builtins.attrValues (removeAttrs pages [ "_category" ]));
|
||||
|
||||
# Normalised page specs
|
||||
pageList = collectPages pages;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ let
|
|||
value =
|
||||
let
|
||||
file = removeNixvimPrefix location.file;
|
||||
line = builtins.toString location.line;
|
||||
line = toString location.line;
|
||||
text = "${file}:${line}";
|
||||
target = "${urlPrefix}/${file}#L${line}";
|
||||
in
|
||||
|
|
@ -80,6 +80,6 @@ lib.pipe functionSet [
|
|||
# No need to include out-of-tree entries
|
||||
(builtins.filter (entry: lib.strings.hasPrefix rootPathString entry.location.file))
|
||||
# Convert entries to attrset
|
||||
(builtins.map entryToNameValuePair)
|
||||
(map entryToNameValuePair)
|
||||
builtins.listToAttrs
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue