aboutsummaryrefslogtreecommitdiff
path: root/bin/tests
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-06-04 11:50:19 +0100
committerAkshay <[email protected]>2022-06-04 11:50:19 +0100
commit33490aa211fdd2b2292c396002123035e0b1fe54 (patch)
treef3bc82168492327b3306d178154dc5fa4d63cf52 /bin/tests
parentd197ae112457f68728e3495498b8ae1b6d087db0 (diff)
do not raise empty-let when comments are presentfix/empty-let-in-comment
Diffstat (limited to 'bin/tests')
-rw-r--r--bin/tests/data/empty_let_in.nix16
-rw-r--r--bin/tests/snapshots/main__empty_let_in.snap10
2 files changed, 18 insertions, 8 deletions
diff --git a/bin/tests/data/empty_let_in.nix b/bin/tests/data/empty_let_in.nix
index 3ecb6e4..54fee2a 100644
--- a/bin/tests/data/empty_let_in.nix
+++ b/bin/tests/data/empty_let_in.nix
@@ -1,3 +1,13 @@
1let 1[
2in 2 (
3 null 3 let
4 in
5 null
6 )
7 (
8 let
9 # don't match this, we have a comment
10 in
11 null
12 )
13]
diff --git a/bin/tests/snapshots/main__empty_let_in.snap b/bin/tests/snapshots/main__empty_let_in.snap
index 426692f..df0911d 100644
--- a/bin/tests/snapshots/main__empty_let_in.snap
+++ b/bin/tests/snapshots/main__empty_let_in.snap
@@ -4,11 +4,11 @@ expression: "&out"
4 4
5--- 5---
6[W02] Warning: Useless let-in expression 6[W02] Warning: Useless let-in expression
7 ╭─[data/empty_let_in.nix:1:1] 7 ╭─[data/empty_let_in.nix:3:5]
8 8
9 1 │ ╭─▶ let 9 3 │ ╭─▶ let
10 3 │ ├─▶ null 10 5 │ ├─▶ null
11 · │ 11 · │
12 · ╰──────────── This let-in expression has no entries 12 · ╰────────────── This let-in expression has no entries
13───╯ 13───╯
14 14