tangled
alpha
login
or
join now
oppi.li
/
statix
0
fork
atom
Lints and suggestions for the Nix programming language
0
fork
atom
overview
issues
pulls
pipelines
chore: 1-expr tests redundant_pattern_bind
mightyiam.tngl.sh
5 months ago
902304ba
79159ba2
+30
-22
7 changed files
expand all
collapse all
unified
split
bin
tests
data
redundant_pattern_bind.nix
main.rs
redundant_pattern_bind.rs
snapshots
main__redundant_pattern_bind_fix.snap
main__redundant_pattern_bind_lint.snap
redundant_pattern_bind__fix_01ae2aa8e74bbccf70f47469dad2c734944f7d3e39cd86cce214566a1fca2c0f.snap
redundant_pattern_bind__lint_01ae2aa8e74bbccf70f47469dad2c734944f7d3e39cd86cce214566a1fca2c0f.snap
-1
bin/tests/data/redundant_pattern_bind.nix
···
1
1
-
{ ... } @ inputs: null
-1
bin/tests/main.rs
···
44
44
}
45
45
46
46
test_lint! {
47
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
1
+
mod _utils;
2
2
+
3
3
+
use macros::generate_tests;
4
4
+
5
5
+
generate_tests! {
6
6
+
rule: manual_inherit,
7
7
+
expressions: [
8
8
+
"{ ... } @ inputs: null"
9
9
+
],
10
10
+
}
-9
bin/tests/snapshots/main__redundant_pattern_bind_fix.snap
···
1
1
-
---
2
2
-
source: bin/tests/main.rs
3
3
-
expression: "&stdout"
4
4
-
---
5
5
-
--- tests/data/redundant_pattern_bind.nix
6
6
-
+++ tests/data/redundant_pattern_bind.nix [fixed]
7
7
-
@@ -1 +1 @@
8
8
-
-{ ... } @ inputs: null
9
9
-
+inputs: null
-11
bin/tests/snapshots/main__redundant_pattern_bind_lint.snap
···
1
1
-
---
2
2
-
source: bin/tests/main.rs
3
3
-
expression: "&stdout"
4
4
-
---
5
5
-
[W11] Warning: Found redundant pattern bind in function argument
6
6
-
╭─[tests/data/redundant_pattern_bind.nix:1:1]
7
7
-
│
8
8
-
1 │ { ... } @ inputs: null
9
9
-
· ────────┬────────
10
10
-
· ╰────────── This pattern bind is redundant, use inputs instead
11
11
-
───╯
+9
bin/tests/snapshots/redundant_pattern_bind__fix_01ae2aa8e74bbccf70f47469dad2c734944f7d3e39cd86cce214566a1fca2c0f.snap
···
1
1
+
---
2
2
+
source: bin/tests/redundant_pattern_bind.rs
3
3
+
expression: "\"{ ... } @ inputs: null\""
4
4
+
---
5
5
+
--- <temp_file_path>
6
6
+
+++ <temp_file_path> [fixed]
7
7
+
@@ -1 +1 @@
8
8
+
-{ ... } @ inputs: null
9
9
+
+inputs: null
+11
bin/tests/snapshots/redundant_pattern_bind__lint_01ae2aa8e74bbccf70f47469dad2c734944f7d3e39cd86cce214566a1fca2c0f.snap
···
1
1
+
---
2
2
+
source: bin/tests/redundant_pattern_bind.rs
3
3
+
expression: "\"{ ... } @ inputs: null\""
4
4
+
---
5
5
+
[W11] Warning: Found redundant pattern bind in function argument
6
6
+
╭─[<temp_file_path>:1:1]
7
7
+
│
8
8
+
1 │ { ... } @ inputs: null
9
9
+
· ────────┬───────
10
10
+
· ╰───────── This pattern bind is redundant, use inputs instead
11
11
+
───╯