aboutsummaryrefslogtreecommitdiff
path: root/bin/tests/data/faster_zipattrswith.nix
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-01-30 06:40:21 +0000
committerAkshay <[email protected]>2022-01-30 06:40:21 +0000
commita254edfcd27f1bba5eb7eacb11bfcd077bd1af16 (patch)
tree6cf3eb3df65952b49f6539607741eca2e65ba149 /bin/tests/data/faster_zipattrswith.nix
parenteffe06e2f16f5b6faab258ff2b031dd5f14d59ec (diff)
new lint: faster_zipattrswith
Diffstat (limited to 'bin/tests/data/faster_zipattrswith.nix')
-rw-r--r--bin/tests/data/faster_zipattrswith.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/tests/data/faster_zipattrswith.nix b/bin/tests/data/faster_zipattrswith.nix
new file mode 100644
index 0000000..2612995
--- /dev/null
+++ b/bin/tests/data/faster_zipattrswith.nix
@@ -0,0 +1,13 @@
1{
2 # trivial case
3 _ = lib.zipAttrsWith (name: values: values) [{ a = 1; } { a = 2; b = 3; }];
4
5 # offer lint heuristically on this too
6 _ = nixpkgs.lib.zipAttrsWith (name: values: values) [{ a = 1; } { a = 2; b = 3; }];
7
8 # do not lint on `builtins`
9 _ = builtins.zipAttrsWith (name: values: values) [
10 { a = 1; }
11 { a = 2; b = 3; }
12 ];
13}