Lints and suggestions for the Nix programming language
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: 1-expr tests empty_inherit

+30 -25
-3
bin/tests/data/empty_inherit.nix
··· 1 - { 2 - inherit; 3 - }
+10
bin/tests/empty_inherit.rs
··· 1 + mod _utils; 2 + 3 + use macros::generate_tests; 4 + 5 + generate_tests! { 6 + rule: manual_inherit, 7 + expressions: [ 8 + "{ inherit; }" 9 + ], 10 + }
-1
bin/tests/main.rs
··· 44 44 } 45 45 46 46 test_lint! { 47 - empty_inherit, 48 47 deprecated_to_path, 49 48 useless_has_attr, 50 49 repeated_keys,
+9
bin/tests/snapshots/empty_inherit__fix_2370f348818d984736674ed594a500980e67c68740a68810e6d7ad6e42e95cad.snap
··· 1 + --- 2 + source: bin/tests/empty_inherit.rs 3 + expression: "\"{ inherit; }\"" 4 + --- 5 + --- <temp_file_path> 6 + +++ <temp_file_path> [fixed] 7 + @@ -1 +1 @@ 8 + -{ inherit; } 9 + +{ }
+11
bin/tests/snapshots/empty_inherit__lint_2370f348818d984736674ed594a500980e67c68740a68810e6d7ad6e42e95cad.snap
··· 1 + --- 2 + source: bin/tests/empty_inherit.rs 3 + expression: "\"{ inherit; }\"" 4 + --- 5 + [W14] Warning: Found empty inherit statement 6 + ╭─[<temp_file_path>:1:3] 7 + 8 + 1 │ { inherit; } 9 + · ────┬─── 10 + · ╰───── Remove this empty inherit statement 11 + ───╯
-10
bin/tests/snapshots/main__empty_inherit_fix.snap
··· 1 - --- 2 - source: bin/tests/main.rs 3 - expression: "&stdout" 4 - --- 5 - --- tests/data/empty_inherit.nix 6 - +++ tests/data/empty_inherit.nix [fixed] 7 - @@ -1,3 +1,2 @@ 8 - { 9 - - inherit; 10 - }
-11
bin/tests/snapshots/main__empty_inherit_lint.snap
··· 1 - --- 2 - source: bin/tests/main.rs 3 - expression: "&stdout" 4 - --- 5 - [W14] Warning: Found empty inherit statement 6 - ╭─[tests/data/empty_inherit.nix:2:3] 7 - 8 - 2 │ inherit; 9 - · ────┬─── 10 - · ╰───── Remove this empty inherit statement 11 - ───╯