style: format entire depot with nixpkgs-fmt
This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
2d10d60fac
commit
aa122cbae7
310 changed files with 7278 additions and 5490 deletions
|
|
@ -10,13 +10,13 @@ let
|
|||
|
||||
tree-ex = depot.nix.readTree {
|
||||
path = ./test-example;
|
||||
args = {};
|
||||
args = { };
|
||||
};
|
||||
|
||||
example = it "corresponds to the README example" [
|
||||
(assertEq "third_party attrset"
|
||||
(lib.isAttrs tree-ex.third_party
|
||||
&& (! lib.isDerivation tree-ex.third_party))
|
||||
&& (! lib.isDerivation tree-ex.third_party))
|
||||
true)
|
||||
(assertEq "third_party attrset other attribute"
|
||||
tree-ex.third_party.favouriteColour
|
||||
|
|
@ -37,7 +37,7 @@ let
|
|||
|
||||
tree-tl = depot.nix.readTree {
|
||||
path = ./test-tree-traversal;
|
||||
args = {};
|
||||
args = { };
|
||||
};
|
||||
|
||||
traversal-logic = it "corresponds to the traversal logic in the README" [
|
||||
|
|
@ -82,7 +82,7 @@ let
|
|||
"Picked up through the drv")
|
||||
(assertEq "default.nix drv is not changed by readTree"
|
||||
tree-tl.default-nix.can-be-drv
|
||||
(import ./test-tree-traversal/default-nix/can-be-drv/default.nix {}))
|
||||
(import ./test-tree-traversal/default-nix/can-be-drv/default.nix { }))
|
||||
];
|
||||
|
||||
# these each call readTree themselves because the throws have to happen inside assertThrows
|
||||
|
|
@ -90,7 +90,7 @@ let
|
|||
(assertThrows "this file is not a function"
|
||||
(depot.nix.readTree {
|
||||
path = ./test-wrong-not-a-function;
|
||||
args = {};
|
||||
args = { };
|
||||
}).not-a-function)
|
||||
# can’t test for that, assertThrows can’t catch this error
|
||||
# (assertThrows "this file is a function but doesn’t have dots"
|
||||
|
|
@ -99,12 +99,13 @@ let
|
|||
|
||||
read-markers = depot.nix.readTree {
|
||||
path = ./test-marker;
|
||||
args = {};
|
||||
args = { };
|
||||
};
|
||||
|
||||
assertMarkerByPath = path:
|
||||
assertEq "${lib.concatStringsSep "." path} is marked correctly"
|
||||
(lib.getAttrFromPath path read-markers).__readTree path;
|
||||
(lib.getAttrFromPath path read-markers).__readTree
|
||||
path;
|
||||
|
||||
markers = it "marks nodes correctly" [
|
||||
(assertMarkerByPath [ "directory-marked" ])
|
||||
|
|
@ -119,7 +120,8 @@ let
|
|||
read-markers.directory-marked.nested.__readTreeChildren [ ])
|
||||
];
|
||||
|
||||
in runTestsuite "readTree" [
|
||||
in
|
||||
runTestsuite "readTree" [
|
||||
example
|
||||
traversal-logic
|
||||
wrong
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{}
|
||||
{ }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{}
|
||||
{ }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{}
|
||||
{ }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{}
|
||||
{ }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue