Skip to content

Commit dbda4af

Browse files
committed
Add a larger test for the extension
Includes larger files, such as `res_core.ml` and vendored compiler libs from the syntax module.
1 parent 15e5b7c commit dbda4af

File tree

148 files changed

+107235
-3539
lines changed

Some content is hidden

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

148 files changed

+107235
-3539
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
81560

analysis/reanalyze/examples/deadcode/expected/deadcode.txt

Lines changed: 41881 additions & 2181 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,2 @@
11

2-
3-
Exception Analysis
4-
File "Exn.res", line 1, characters 5-11
5-
raises might raise Not_found (Exn.res:1:19) and is not annotated with @raises(Not_found)
6-
7-
Exception Analysis
8-
File "Exn.res", line 19, characters 5-29
9-
callsRaiseWithAnnotation might raise Not_found (Exn.res:19:31) and is not annotated with @raises(Not_found)
10-
11-
Exception Analysis
12-
File "Exn.res", line 22, characters 5-43
13-
callsRaiseWithAnnotationAndIsAnnotated might raise Not_found (Exn.res:22:45) and is not annotated with @raises(Not_found)
14-
15-
Exception Analysis
16-
File "Exn.res", line 22, characters 5-43
17-
callsRaiseWithAnnotationAndIsAnnotated might raise Not_found (Exn.res:22:45) and is annotated with redundant @raises(A)
18-
19-
Exception Analysis
20-
File "Exn.res", line 24, characters 5-6
21-
z might raise Failure (Exn.res:24:8) and is not annotated with @raises(Failure)
22-
23-
Exception Analysis
24-
File "Exn.res", line 26, characters 5-20
25-
incompleteMatch might raise Match_failure (Exn.res:27:2) and is not annotated with @raises(Match_failure)
26-
27-
Exception Analysis
28-
File "Exn.res", line 34, characters 5-14
29-
twoRaises might raise [A (Exn.res:36:4), B (Exn.res:39:4)] and is not annotated with @raises([A, B])
30-
31-
Exception Analysis
32-
File "Exn.res", line 43, characters 5-15
33-
sequencing might raise A (Exn.res:44:2) and is not annotated with @raises(A)
34-
35-
Exception Analysis
36-
File "Exn.res", line 50, characters 5-15
37-
wrongCatch might raise B (Exn.res:51:6) and is not annotated with @raises(B)
38-
39-
Exception Analysis
40-
File "Exn.res", line 56, characters 5-16
41-
wrongCatch2 might raise [C (Exn.res:57:24), Match_failure (Exn.res:57:2)] and is not annotated with @raises([C, Match_failure])
42-
43-
Exception Analysis
44-
File "Exn.res", line 64, characters 5-20
45-
raise2Annotate3 might raise [A (Exn.res:66:4), B (Exn.res:69:4)] and is annotated with redundant @raises(C)
46-
47-
Exception Analysis
48-
File "Exn.res", line 75, characters 5-25
49-
parse_json_from_file might raise Error (Exn.res:78:4) and is not annotated with @raises(Error)
50-
51-
Exception Analysis
52-
File "Exn.res", line 84, characters 5-12
53-
reRaise might raise B (Exn.res:86:19) and is not annotated with @raises(B)
54-
55-
Exception Analysis
56-
File "Exn.res", line 95, characters 5-23
57-
raiseInInternalLet might raise A (Exn.res:96:14) and is not annotated with @raises(A)
58-
59-
Exception Analysis
60-
File "Exn.res", line 100, characters 5-17
61-
indirectCall might raise Not_found (Exn.res:100:31) and is not annotated with @raises(Not_found)
62-
63-
Exception Analysis
64-
File "Exn.res", line 148, characters 5-17
65-
severalCases might raise Failure (Exn.res:150:13 Exn.res:151:13 Exn.res:152:15) and is not annotated with @raises(Failure)
66-
67-
Exception Analysis
68-
File "Exn.res", line 159, characters 32-57
69-
String.uncapitalize_ascii does not raise and is annotated with redundant @doesNotRaise
70-
71-
Exception Analysis
72-
File "Exn.res", line 161, characters 32-64
73-
String.uncapitalize_ascii does not raise and is annotated with redundant @doesNotRaise
74-
75-
Exception Analysis
76-
File "Exn.res", line 163, characters 47-72
77-
String.uncapitalize_ascii does not raise and is annotated with redundant @doesNotRaise
78-
79-
Exception Analysis
80-
File "Exn.res", line 163, characters 47-80
81-
expression does not raise and is annotated with redundant @doesNotRaise
82-
83-
Exception Analysis
84-
File "Exn.res", line 169, characters 51-56
85-
expression does not raise and is annotated with redundant @doesNotRaise
86-
87-
Exception Analysis
88-
File "Exn.res", line 167, characters 25-57
89-
String.uncapitalize_ascii does not raise and is annotated with redundant @doesNotRaise
90-
91-
Exception Analysis
92-
File "Exn.res", line 176, characters 5-24
93-
redundantAnnotation raises nothing and is annotated with redundant @raises(Invalid_argument)
94-
95-
Exception Analysis
96-
File "Exn.res", line 178, characters 5-7
97-
_x might raise A (Exn.res:178:9) and is not annotated with @raises(A)
98-
99-
Exception Analysis
100-
File "Exn.res", line 180, characters 5-6
101-
_ might raise A (Exn.res:180:8) and is not annotated with @raises(A)
102-
103-
Exception Analysis
104-
File "Exn.res", line 182, characters 5-7
105-
() might raise A (Exn.res:182:9) and is not annotated with @raises(A)
106-
107-
Exception Analysis
108-
File "Exn.res", line 184, characters 1-17
109-
Toplevel expression might raise Not_found (Exn.res:184:0) and is not annotated with @raises(Not_found)
110-
111-
Exception Analysis
112-
File "Exn.res", line 186, characters 1-20
113-
Toplevel expression might raise exit (Exn.res:186:7) and is not annotated with @raises(exit)
114-
115-
Exception Analysis
116-
File "Exn.res", line 196, characters 45-47
117-
expression does not raise and is annotated with redundant @doesNotRaise
118-
119-
Exception Analysis
120-
File "Exn.res", line 196, characters 5-22
121-
onResultPipeWrong might raise Assert_failure (Exn.res:196:48) and is not annotated with @raises(Assert_failure)
122-
123-
Exception Analysis
124-
File "ExnA.res", line 1, characters 5-8
125-
bar might raise Not_found (ExnA.res:1:16) and is not annotated with @raises(Not_found)
126-
127-
Analysis reported 31 issues (Exception Analysis:31)
2+
Analysis reported 0 issues

analysis/reanalyze/examples/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-

analysis/reanalyze/examples/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-

analysis/reanalyze/examples/deadcode/src/BucklescriptAnnotations.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ let bar = (x: someMethods) => {
2626
let f = x["twoArgs"]
2727
f(. 3, "a")
2828
}
29-

analysis/reanalyze/examples/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")
9-

analysis/reanalyze/examples/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-
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
module type T = {
22
let x: int
33
}
4-

analysis/reanalyze/examples/deadcode/src/DeadExn.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ let eToplevel = Etoplevel
1010
let eInside = Inside.Einside
1111

1212
Js.log(eInside)
13-
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
// empty
22
exception Etoplevel
3-

analysis/reanalyze/examples/deadcode/src/DeadRT.res

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ let rec emitModuleAccessPath = moduleAccessPath =>
99
}
1010

1111
let () = Js.log(Kaboom)
12-
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
type moduleAccessPath =
22
| Root(string)
33
| Kaboom
4-

0 commit comments

Comments
 (0)