feat(natu): lint redundant parameter forwarding

This commit was merged in pull request #114.
This commit is contained in:
2026-09-30 00:19:27 -04:00
parent becbb50491
commit 2265dfc558
5 changed files with 320 additions and 9 deletions

View File

@@ -21,21 +21,20 @@ let
);
collectData =
{ hosts }:
let
data = lib.mapAttrs (
registryName: registry:
if registry.replicate or false then
replicatedData registryName hosts raw.${registryName}
replicatedData registryName raw.${registryName}
else
lib.mapAttrs (hostName: host: host.config.registry.${registryName}.${hostName} or { }) hosts
) definitions;
raw = lib.mapAttrs (registryName: _registry: rawDeclarations registryName hosts) definitions;
raw = lib.mapAttrs (registryName: _registry: rawDeclarations registryName) definitions;
in
validate data;
replicatedData =
registryName: hosts: raw:
registryName: raw:
let
entries = lib.mapAttrs (_entryName: entry: entry.value) (replicatedEntries registryName raw);
in
@@ -74,9 +73,6 @@ let
) { } entries;
rawDeclarations =
registryName: hosts:
lib.mapAttrs (_hostName: host: host.config.registry.${registryName} or { }) hosts;
registryName: lib.mapAttrs (_hostName: host: host.config.registry.${registryName} or { }) hosts;
in
withOperations (collectData {
inherit hosts;
})
withOperations collectData