From a254edfcd27f1bba5eb7eacb11bfcd077bd1af16 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 30 Jan 2022 12:10:21 +0530 Subject: new lint: faster_zipattrswith --- bin/tests/data/faster_zipattrswith.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 bin/tests/data/faster_zipattrswith.nix (limited to 'bin/tests/data/faster_zipattrswith.nix') 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 @@ +{ + # trivial case + _ = lib.zipAttrsWith (name: values: values) [{ a = 1; } { a = 2; b = 3; }]; + + # offer lint heuristically on this too + _ = nixpkgs.lib.zipAttrsWith (name: values: values) [{ a = 1; } { a = 2; b = 3; }]; + + # do not lint on `builtins` + _ = builtins.zipAttrsWith (name: values: values) [ + { a = 1; } + { a = 2; b = 3; } + ]; +} -- cgit v1.2.3