Lints and suggestions for the Nix programming language

chore: 1-expr tests redundant_pattern_bind

+30 -22
-1
bin/tests/data/redundant_pattern_bind.nix
··· 1 - { ... } @ inputs: null
-1
bin/tests/main.rs
··· 44 44 } 45 45 46 46 test_lint! { 47 - redundant_pattern_bind, 48 47 unquoted_uri, 49 48 empty_inherit, 50 49 deprecated_to_path,
+10
bin/tests/redundant_pattern_bind.rs
··· 1 + mod _utils; 2 + 3 + use macros::generate_tests; 4 + 5 + generate_tests! { 6 + rule: manual_inherit, 7 + expressions: [ 8 + "{ ... } @ inputs: null" 9 + ], 10 + }
-9
bin/tests/snapshots/main__redundant_pattern_bind_fix.snap
··· 1 - --- 2 - source: bin/tests/main.rs 3 - expression: "&stdout" 4 - --- 5 - --- tests/data/redundant_pattern_bind.nix 6 - +++ tests/data/redundant_pattern_bind.nix [fixed] 7 - @@ -1 +1 @@ 8 - -{ ... } @ inputs: null 9 - +inputs: null
-11
bin/tests/snapshots/main__redundant_pattern_bind_lint.snap
··· 1 - --- 2 - source: bin/tests/main.rs 3 - expression: "&stdout" 4 - --- 5 - [W11] Warning: Found redundant pattern bind in function argument 6 - ╭─[tests/data/redundant_pattern_bind.nix:1:1] 7 - 8 - 1 │ { ... } @ inputs: null 9 - · ────────┬──────── 10 - · ╰────────── This pattern bind is redundant, use inputs instead 11 - ───╯
+9
bin/tests/snapshots/redundant_pattern_bind__fix_01ae2aa8e74bbccf70f47469dad2c734944f7d3e39cd86cce214566a1fca2c0f.snap
··· 1 + --- 2 + source: bin/tests/redundant_pattern_bind.rs 3 + expression: "\"{ ... } @ inputs: null\"" 4 + --- 5 + --- <temp_file_path> 6 + +++ <temp_file_path> [fixed] 7 + @@ -1 +1 @@ 8 + -{ ... } @ inputs: null 9 + +inputs: null
+11
bin/tests/snapshots/redundant_pattern_bind__lint_01ae2aa8e74bbccf70f47469dad2c734944f7d3e39cd86cce214566a1fca2c0f.snap
··· 1 + --- 2 + source: bin/tests/redundant_pattern_bind.rs 3 + expression: "\"{ ... } @ inputs: null\"" 4 + --- 5 + [W11] Warning: Found redundant pattern bind in function argument 6 + ╭─[<temp_file_path>:1:1] 7 + 8 + 1 │ { ... } @ inputs: null 9 + · ────────┬─────── 10 + · ╰───────── This pattern bind is redundant, use inputs instead 11 + ───╯