feat(natu): lint redundant parameter forwarding
This commit was merged in pull request #114.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user