Skip to content

Commit 4b6a19c

Browse files
committed
Capitalize two lowercase error messages for consistency
Errors are sentence-case; "unsupported predicates" and the consecutive- statements syntax error started lowercase.
1 parent 73522cb commit 4b6a19c

14 files changed

Lines changed: 16 additions & 16 deletions

File tree

compiler/frontend/bs_syntaxerr.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ let pp_error fmt err =
6464
"Unsupported @return directive. Supported directives are `null_to_opt`, \
6565
`null_undefined_to_opt` (or `nullable`), and `identity`."
6666
| Illegal_attribute -> "Illegal attributes"
67-
| Unsupported_predicates -> "unsupported predicates"
67+
| Unsupported_predicates -> "Unsupported predicates"
6868
| Duplicated_bs_deriving ->
6969
"Duplicate @deriving attribute; a type can only have one."
7070
| Conflict_attributes names ->

compiler/syntax/src/res_core.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6688,7 +6688,7 @@ and parse_newline_or_semicolon_structure p =
66886688
else
66896689
Parser.err ~start_pos:p.prev_end_pos ~end_pos:p.end_pos p
66906690
(Diagnostics.message
6691-
"consecutive statements on a line must be separated by ';' or a \
6691+
"Consecutive statements on a line must be separated by ';' or a \
66926692
newline")
66936693
| _ -> ()
66946694

tests/analysis_tests/tests/not_compiled/expected/Diagnostics.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"message": "consecutive statements on a line must be separated by ';' or a newline",
3+
"message": "Consecutive statements on a line must be separated by ';' or a newline",
44
"range": {
55
"end": { "character": 6, "line": 2 },
66
"start": { "character": 4, "line": 2 }

tests/build_tests/super_errors/expected/bs_unsupported_predicates.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
1 │ type t = {..@get({weird: true}) "x": int}
66
2 │
77

8-
unsupported predicates
8+
Unsupported predicates

tests/build_tests/super_errors/expected/syntaxErrors2.res.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
2 │ I'm glad you're looking at this file =)
77
3 │
88

9-
consecutive statements on a line must be separated by ';' or a newline
9+
Consecutive statements on a line must be separated by ';' or a newline

tests/syntax_tests/data/parsing/errors/expressions/expected/consecutive.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
2 │
77
3 │ let f = (g, h) => {
88

9-
consecutive statements on a line must be separated by ';' or a newline
9+
Consecutive statements on a line must be separated by ';' or a newline
1010

1111

1212
Syntax error!

tests/syntax_tests/data/parsing/errors/pattern/expected/missing.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
5 │ Js.log("for")
4242
6 │ }
4343

44-
consecutive statements on a line must be separated by ';' or a newline
44+
Consecutive statements on a line must be separated by ';' or a newline
4545

4646

4747
Syntax error!

tests/syntax_tests/data/parsing/errors/scanner/expected/exoticIdent.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
9 │ c" = 1
9191
10 │
9292

93-
consecutive statements on a line must be separated by ';' or a newline
93+
Consecutive statements on a line must be separated by ';' or a newline
9494

9595
type nonrec \""
9696
type nonrec \"" = int

tests/syntax_tests/data/parsing/errors/structure/expected/consecutive.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1 │ open Foo exception Bar
66
2 │
77

8-
consecutive statements on a line must be separated by ';' or a newline
8+
Consecutive statements on a line must be separated by ';' or a newline
99

1010
open Foo
1111
exception Bar

tests/syntax_tests/data/parsing/grammar/ffi/expected/export.res.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
2 │
77
3 │ export type t = int and export s = string
88

9-
consecutive statements on a line must be separated by ';' or a newline
9+
Consecutive statements on a line must be separated by ';' or a newline
1010

1111

1212
Syntax error!
@@ -18,7 +18,7 @@
1818
4 │ export type t = int and s = string
1919
5 │ type t = int and export s = string
2020

21-
consecutive statements on a line must be separated by ';' or a newline
21+
Consecutive statements on a line must be separated by ';' or a newline
2222

2323

2424
Syntax error!
@@ -30,7 +30,7 @@
3030
6 │
3131
7 │ export let callback = _ => Js.log("Clicked")
3232

33-
consecutive statements on a line must be separated by ';' or a newline
33+
Consecutive statements on a line must be separated by ';' or a newline
3434

3535

3636
Syntax error!

0 commit comments

Comments
 (0)