Compare commits
1 Commits
9cbbea3d7a
...
1b4dc77627
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b4dc77627 |
@@ -3,7 +3,17 @@
|
||||
lib,
|
||||
}:
|
||||
let
|
||||
# NOLINT(single_use_binding)
|
||||
assertValid =
|
||||
data:
|
||||
let
|
||||
assertions = validationAssertions data;
|
||||
failures = lib.filter (assertion: !assertion.assertion) assertions;
|
||||
in
|
||||
assert lib.assertMsg (lib.all (assertion: assertion.assertion) assertions) (
|
||||
lib.concatMapStringsSep "\n" (assertion: assertion.message) failures
|
||||
);
|
||||
data;
|
||||
|
||||
validationAssertions =
|
||||
data:
|
||||
lib.concatLists (
|
||||
@@ -19,7 +29,6 @@ let
|
||||
) definitions
|
||||
);
|
||||
|
||||
# NOLINT(single_use_binding)
|
||||
flattenRegistryEntries =
|
||||
registryName: data:
|
||||
lib.concatLists (
|
||||
@@ -32,13 +41,4 @@ let
|
||||
) data
|
||||
);
|
||||
in
|
||||
data:
|
||||
let
|
||||
assertions = validationAssertions data;
|
||||
in
|
||||
assert lib.assertMsg (lib.all (assertion: assertion.assertion) assertions) (
|
||||
lib.concatMapStringsSep "\n" (assertion: assertion.message) (
|
||||
lib.filter (assertion: !assertion.assertion) assertions
|
||||
)
|
||||
);
|
||||
data
|
||||
assertValid
|
||||
|
||||
Reference in New Issue
Block a user