diff options
author | Akshay <[email protected]> | 2021-12-04 07:32:57 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2021-12-04 07:34:20 +0000 |
commit | 21775f28cd1bdde8eddd84a508813b01d620db89 (patch) | |
tree | ca78b5732040253bc49baafa5f1889e848172daa /bin | |
parent | 1079486539d44b2e70c623fb4948d6e0b9b11812 (diff) |
new lint: empty_inherit
Diffstat (limited to 'bin')
-rw-r--r-- | bin/tests/data/empty_inherit.nix | 3 | ||||
-rw-r--r-- | bin/tests/snapshots/main__empty_inherit.snap | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/bin/tests/data/empty_inherit.nix b/bin/tests/data/empty_inherit.nix new file mode 100644 index 0000000..dc31afc --- /dev/null +++ b/bin/tests/data/empty_inherit.nix | |||
@@ -0,0 +1,3 @@ | |||
1 | { | ||
2 | inherit; | ||
3 | } | ||
diff --git a/bin/tests/snapshots/main__empty_inherit.snap b/bin/tests/snapshots/main__empty_inherit.snap new file mode 100644 index 0000000..1d91e0a --- /dev/null +++ b/bin/tests/snapshots/main__empty_inherit.snap | |||
@@ -0,0 +1,13 @@ | |||
1 | --- | ||
2 | source: bin/tests/main.rs | ||
3 | expression: "&out" | ||
4 | |||
5 | --- | ||
6 | [W14] Warning: Found empty inherit statement | ||
7 | ╭─[data/empty_inherit.nix:2:3] | ||
8 | │ | ||
9 | 2 │ inherit; | ||
10 | · ────┬─── | ||
11 | · ╰───── Remove this empty inherit statement | ||
12 | ───╯ | ||
13 | |||