Skip to content

Commit 53aa85d

Browse files
committed
Format analysis tests
1 parent 01ee097 commit 53aa85d

File tree

116 files changed

+3678
-644
lines changed

Some content is hidden

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

116 files changed

+3678
-644
lines changed

scripts/format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ shopt -s extglob
44

55
dune build @fmt --auto-promote
66

7-
files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -name "generated_mocha_test.res" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests*" ! -path "*/node_modules/*")
7+
files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -name "generated_mocha_test.res" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests/not_compiled/*" ! -path "*/node_modules/*")
88
./cli/rescript.js format $files
99

1010
yarn format

scripts/format_check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ case "$(uname -s)" in
1717
fi
1818

1919
echo "Checking ReScript code formatting..."
20-
files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -name "generated_mocha_test.res" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests*" ! -path "*/node_modules/*")
20+
files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -name "generated_mocha_test.res" ! -path "tests/syntax_*" ! -path "tests/analysis_tests/tests/not_compiled/*" ! -path "*/node_modules/*")
2121
if ./cli/rescript.js format -check $files; then
2222
printf "${successGreen}✅ ReScript code formatting ok.${reset}\n"
2323
else

tests/analysis_tests/tests-generic-jsx-transform/src/GenericJsx.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module Elements = {
4141
type props = {
4242
testing?: bool,
4343
test2?: string,
44-
children?: element
44+
children?: element,
4545
}
4646

4747
@module("preact")
@@ -60,4 +60,4 @@ module Elements = {
6060
external jsxsKeyed: (string, props, ~key: string=?, @ignore unit) => Jsx.element = "jsxs"
6161

6262
external someElement: element => option<element> = "%identity"
63-
}
63+
}

tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt

Lines changed: 141 additions & 141 deletions
Large diffs are not rendered by default.

tests/analysis_tests/tests-reanalyze/deadcode/src/AutoAnnotate.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ type r4 = {r4: int}
1313
type annotatedVariant =
1414
| R2(r2, r3)
1515
| R4(r4)
16-

tests/analysis_tests/tests-reanalyze/deadcode/src/BootloaderResource.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
* improved. Use with caution. */
33
@module("BootloaderResource")
44
external read: JSResource.t<'a> => 'a = "read"
5-

tests/analysis_tests/tests-reanalyze/deadcode/src/BucklescriptAnnotations.res

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ type someMethods = {
1414
@meth
1515
"send": string => unit,
1616
@meth
17-
"on": (string, (. int) => unit) => unit,
17+
"on": (string, int => unit) => unit,
1818
@meth
1919
"threeargs": (int, string, int) => string,
20-
"twoArgs": (. int, string) => int,
20+
"twoArgs": (int, string) => int,
2121
}
2222

2323
// let foo = (x: someMethods) => x["threeargs"](3, "a", 4)
2424

2525
let bar = (x: someMethods) => {
2626
let f = x["twoArgs"]
27-
f(. 3, "a")
27+
f(3, "a")
2828
}
29-

tests/analysis_tests/tests-reanalyze/deadcode/src/CreateErrorHandler1.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ module Error1 = {
66
module MyErrorHandler = ErrorHandler.Make(Error1)
77

88
MyErrorHandler.notify("abc")->ignore
9-

tests/analysis_tests/tests-reanalyze/deadcode/src/CreateErrorHandler2.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ module Error2 = {
44
}
55

66
module MyErrorHandler = ErrorHandler.Make(Error2) /* MyErrorHandler.notify(42) */
7-
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
module M: DeadCodeInterface.T = {
22
let x = 42
33
}
4-

0 commit comments

Comments
 (0)