Skip to content

Commit b0a7a5f

Browse files
committed
[Super errors] Remove useless spaces from old Format's indentation logic
Follow-up of #5013
1 parent 01a596f commit b0a7a5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+102
-123
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
We've found a bug for you!
33
/.../fixtures/arity_mismatch.re:3:21-27
4-
4+
55
1 │
66
2 │ let makeVar = (. ~f, ()) => 34;
77
3 │ let makeVariables = makeVar(. ~f=f => f);
8-
8+
99
This function expected 2 arguments, but got 1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
We've found a bug for you!
33
/.../fixtures/arity_mismatch2.re:3:21-27
4-
4+
55
1 │
66
2 │ let makeVar = (. f, ()) => 34;
77
3 │ let makeVariables = makeVar(. 1,2,3);
8-
8+
99
This function expected 2 arguments, but got 3
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
We've found a bug for you!
33
/.../fixtures/arity_mismatch3.re:1:23-35
4-
4+
55
1 │ Belt.Array.mapU([||], (. a, b) => 1);
6-
6+
77
This function expected 1 argument, but got 2

jscomp/build_tests/super_errors/expected/bucklescript.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
We've found a bug for you!
33
/.../fixtures/bucklescript.re:4:1-3
4-
4+
55
2 │ let app = [@bs] (f, x, y) => f(x);
66
3 │
77
4 │ app(((x) => x + 1), 2);
88
5 │
9-
9+
1010
This is an uncurried ReScript function. It must be applied with a dot.
1111

1212
Like this: foo(. a, b)

jscomp/build_tests/super_errors/expected/collections.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
We've found a bug for you!
33
/.../fixtures/collections.re:2:8-14
4-
4+
55
1 │ /* wrong type in a list */
66
2 │ [1, 2, "Hello"] -> ignore;
77
3 │
8-
8+
99
This has type: string
1010
Somewhere wanted: int
1111

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
We've found a bug for you!
33
/.../fixtures/curry_in_uncurry.re:3:1
4-
4+
55
1 │ let f = (a,b) => a + b;
66
2 │
77
3 │ f(.2,2)->Js.log;
8-
8+
99
This function is a curried function where an uncurried function is expected

jscomp/build_tests/super_errors/expected/highlighting1.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
We've found a bug for you!
33
/.../fixtures/highlighting1.re:1:14-3:3
4-
4+
55
1 │ let a: int = "hel
66
2 │
77
3 │ lo";
8-
8+
99
This has type: string
1010
Somewhere wanted: int
1111

jscomp/build_tests/super_errors/expected/highlighting2.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
We've found a bug for you!
33
/.../fixtures/highlighting2.re:2:36-4:25
4-
4+
55
1 ┆
66
2 ┆ let a: int = "hel
77
3 ┆
88
4 ┆ lo";
99
5 ┆
10-
10+
1111
This has type: string
1212
Somewhere wanted: int
1313

jscomp/build_tests/super_errors/expected/highlighting3.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
We've found a bug for you!
33
/.../fixtures/highlighting3.re:2:14-4:16
4-
4+
55
1 │
66
2 │ let a: int = "helllllll
77
3 │
88
4 │ loooooooooooooo";
99
5 │
10-
10+
1111
This has type: string
1212
Somewhere wanted: int
1313

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
Warning number 3 (configured as error)
33
/.../fixtures/highlighting4.re:5:10
4-
4+
55
3 │ [@deprecated]
66
4 │ type a = int;
77
5 │ type b = a
88
6 │
9-
9+
1010
deprecated: a

jscomp/build_tests/super_errors/expected/highlighting5.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
We've found a bug for you!
33
/.../fixtures/highlighting5.re:2:14-100
4-
4+
55
1 │ /* overflows in the terminal */
66
2 │ let a: int = "hellllllllllllllllllllllllllllllllllllllllllllllllllllllll
77
lllllllllllllllllllllllllll";
88
3 │
9-
9+
1010
This has type: string
1111
Somewhere wanted: int
1212

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
We've found a bug for you!
33
/.../fixtures/highlighting6.re:2:9-13
4-
4+
55
1 │ let aaaaa = 10;
66
2 │ let b = aaaab;
77
3 │
8-
8+
99
The value aaaab can't be found
1010

1111
Hint: Did you mean aaaaa?
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
We've found a bug for you!
33
/.../fixtures/method_arity_mismatch.re:3:5-11
4-
4+
55
1 │ let f = ( obj ) => {
66
2 │ obj##hi (1,2);
77
3 │ obj##hi (1)
88
4 │ }
9-
9+
1010
This method has arity2 but was expected arity1

jscomp/build_tests/super_errors/expected/modules1.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
We've found a bug for you!
33
/.../fixtures/modules1.re:1:9-13
4-
4+
55
1 │ let b = Foo.b;
66
2 │
7-
7+
88
The module or file Foo can't be found.
99
- If it's a third-party dependency:
1010
- Did you list it in bsconfig.json?
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
We've found a bug for you!
33
/.../fixtures/modules2.re:1:9-14
4-
4+
55
1 │ let b = List.b;
6-
6+
77
The value b can't be found in List
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

22
We've found a bug for you!
33
/.../fixtures/modules3.re:11:11-21
4-
4+
55
9 │ };
66
10 │
77
11 │ let asd = A.B.C.D.aaa;
88
12 │
99
13 │
10-
10+
1111
The value aaa can't be found in A.B.C.D
1212

1313
Hint: Did you mean aaaa?
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
We've found a bug for you!
33
/.../fixtures/moreArguments1.re:2:9-15
4-
4+
55
1 │ let x = (~a, ~b) => a + b;
66
2 │ let y = x(~a=2) + 2;
77
3 │
8-
8+
99
This call is missing an argument of type (~b: int)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
We've found a bug for you!
33
/.../fixtures/moreArguments2.re:2:9-12
4-
4+
55
1 │ let x = (a, b) => a + b;
66
2 │ let y = x(2) + 2;
77
3 │
8-
8+
99
This call is missing an argument of type int
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
We've found a bug for you!
33
/.../fixtures/moreArguments3.re:2:9-12
4-
4+
55
1 │ let x = (a, b, c, d) => a + b;
66
2 │ let y = x(2) + 2;
77
3 │
8-
8+
99
This call is missing arguments of type: int, 'a, 'b
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
We've found a bug for you!
33
/.../fixtures/moreArguments4.re:2:9-12
4-
4+
55
1 │ let x = (a, ~b, ~c, ~d) => a + b;
66
2 │ let y = x(2) + 2;
77
3 │
8-
8+
99
This call is missing arguments of type: (~b: int), (~c: 'a), (~d: 'b)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
We've found a bug for you!
33
/.../fixtures/moreArguments5.re:5:9-12
4-
4+
55
3 │ };
66
4 │ let x = (a, b, c, d) => {Sub.a: 2};
77
5 │ let y = x(2).Sub.a;
88
6 │
9-
9+
1010
This call is missing arguments of type: 'a, 'b, 'c
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
Warning number 109 (configured as error)
33
/.../fixtures/partial_app.re:5:1-7
4-
4+
55
3 │ };
66
4 │
77
5 │ f (1,2);
88
6 │
9-
9+
1010
Toplevel expression is expected to have unit type.

jscomp/build_tests/super_errors/expected/primitives1.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
We've found a bug for you!
33
/.../fixtures/primitives1.re:2:1-2
4-
4+
55
1 │ /* got float, wanted int */
66
2 │ 2. + 2;
77
3 │
8-
8+
99
This has type: float
1010
Somewhere wanted: int
1111

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
We've found a bug for you!
33
/.../fixtures/primitives10.re:2:9-13
4-
4+
55
1 │ let aaaaa = 10;
66
2 │ let b = aaaab;
77
3 │
8-
8+
99
The value aaaab can't be found
1010

1111
Hint: Did you mean aaaaa?

jscomp/build_tests/super_errors/expected/primitives11.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

22
We've found a bug for you!
33
/.../fixtures/primitives11.re:5:11-27
4-
4+
55
3 │ type a = option(aa)
66
4 │ type b = option(bb)
77
5 │ let a:a = (Some(Some(5)):b)
88
6 │
9-
9+
1010
This has type: b (defined as option(bb))
1111
Somewhere wanted: a (defined as option(aa))
1212

jscomp/build_tests/super_errors/expected/primitives2.re.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
We've found a bug for you!
33
/.../fixtures/primitives2.re:2:1
4-
4+
55
1 │ /* got int, wanted string */
66
2 │ 2 ++ " things";
77
3 │
8-
8+
99
This has type: int
1010
Somewhere wanted: string
1111

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
We've found a bug for you!
33
/.../fixtures/primitives3.re:3:1
4-
4+
55
1 │ /* Too many arguments */
66
2 │ let x = (a) => a + 2;
77
3 │ x(2, 4);
88
4 │
9-
9+
1010
This function has type int => int
1111
It only accepts 1 argument; here, it's called with more.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
We've found a bug for you!
33
/.../fixtures/primitives4.re:3:1
4-
4+
55
1 │ /* Not a function */
66
2 │ let x = 10;
77
3 │ x(10);
88
4 │
9-
9+
1010
This expression has type int
1111
It is not a function.

0 commit comments

Comments
 (0)