File tree Expand file tree Collapse file tree 10 files changed +20
-14
lines changed Expand file tree Collapse file tree 10 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ SHELL = /bin/bash
3
3
build-native :
4
4
rm -f rescript-editor-analysis.exe
5
5
dune build
6
- cp _build/install/default/bin/rescript-editor-analysis.exe rescript-editor-analysis.exe
6
+ cp _build/install/default/bin/rescript-editor-analysis rescript-editor-analysis.exe
7
7
8
8
dce : build-native
9
9
opam exec reanalyze.exe -- -dce-cmt _build -suppress vendor
Original file line number Diff line number Diff line change
1
+
1
2
Scanning AutoAnnotate.cmt Source:AutoAnnotate.res
2
3
addVariantCaseDeclaration R AutoAnnotate.res:1:15 path:+AutoAnnotate.variant
3
4
addRecordLabelDeclaration variant AutoAnnotate.res:4:15 path:+AutoAnnotate.record
Original file line number Diff line number Diff line change 1
1
2
+
2
3
Exception Analysis
3
4
File "Exn.res", line 1, characters 5-11
4
5
raises might raise Not_found (Exn.res:1:19) and is not annotated with @raises(Not_found)
Original file line number Diff line number Diff line change 6
6
exclude_dirs=" src/exception"
7
7
suppress=" src/ToSuppress.res"
8
8
fi
9
- dune exec -- reanalyze -config -debug -ci -exclude-paths $exclude_dirs -live-names globallyLive1 -live-names globallyLive2,globallyLive3 -suppress $suppress > $output
9
+ dune exec rescript-editor-analysis -- reanalyze -config -debug -ci -exclude-paths $exclude_dirs -live-names globallyLive1 -live-names globallyLive2,globallyLive3 -suppress $suppress > $output
10
10
# CI. We use LF, and the CI OCaml fork prints CRLF. Convert.
11
11
if [ " $RUNNER_OS " == " Windows" ]; then
12
12
perl -pi -e ' s/\r\n/\n/g' -- $output
@@ -18,7 +18,7 @@ if [ "$RUNNER_OS" == "Windows" ]; then
18
18
else
19
19
unsuppress_dirs=" src/exception"
20
20
fi
21
- dune exec reanalyze -- -exception -ci -suppress src -unsuppress $unsuppress_dirs > $output
21
+ dune exec rescript-editor-analysis -- reanalyze -exception -ci -suppress src -unsuppress $unsuppress_dirs > $output
22
22
# CI. We use LF, and the CI OCaml fork prints CRLF. Convert.
23
23
if [ " $RUNNER_OS " == " Windows" ]; then
24
24
perl -pi -e ' s/\r\n/\n/g' -- $output
Original file line number Diff line number Diff line change
1
+
1
2
Scanning TestCyberTruck.cmt Source:TestCyberTruck.res
2
3
3
4
Function Table
Original file line number Diff line number Diff line change 1
1
output=" expected/termination.txt"
2
- dune exec reanalyze -- -config -ci -debug > $output
2
+ dune exec rescript-editor-analysis -- reanalyze -config -ci -debug > $output
3
3
# CI. We use LF, and the CI OCaml fork prints CRLF. Convert.
4
4
if [ " $RUNNER_OS " == " Windows" ]; then
5
5
perl -pi -e ' s/\r\n/\n/g' -- $output
Original file line number Diff line number Diff line change @@ -210,6 +210,3 @@ let cli () =
210
210
let cmtRoot = ! cmtRootRef in
211
211
runAnalysis ~cmt Root ~ppf
212
212
[@@ raises exit]
213
- ;;
214
-
215
- cli () [@@ raises exit]
Original file line number Diff line number Diff line change 1
- (executable
2
- (name Reanalyze)
3
- (public_name reanalyze)
4
- (modes byte exe)
1
+ (library
2
+ (name reanalyze)
5
3
(flags
6
4
(-w "-9")
7
5
(-open Compilerlibs406)
Original file line number Diff line number Diff line change @@ -84,6 +84,13 @@ let main () =
84
84
| [_; " codeAction" ; path; line; col; currentFile] ->
85
85
Commands. codeAction ~path ~line: (int_of_string line)
86
86
~col: (int_of_string col) ~current File
87
+ | _ :: "reanalyze" :: _ ->
88
+ let len = Array. length Sys. argv in
89
+ for i = 1 to len - 2 do
90
+ Sys. argv.(i) < - Sys. argv.(i + 1 )
91
+ done ;
92
+ Sys. argv.(len - 1 ) < - " " ;
93
+ Reanalyze. cli ()
87
94
| [_; " references" ; path; line; col] ->
88
95
Commands. references ~path ~line: (int_of_string line)
89
96
~col: (int_of_string col)
Original file line number Diff line number Diff line change 1
1
(executable
2
- (public_name rescript-editor-analysis.exe )
2
+ (public_name rescript-editor-analysis)
3
3
(modes byte exe)
4
4
; The main module that will become the binary.
5
5
(name Cli)
6
6
(flags
7
7
(-w "+26+27+32+33+39")
8
8
(-open Compilerlibs406)
9
9
(-open Jsonlib)
10
- (-open Outcomeprinter))
10
+ (-open Outcomeprinter)
11
+ (-open Reanalyze))
11
12
; Depends on:
12
- (libraries unix str compilerlibs406 jsonlib outcomeprinter))
13
+ (libraries unix str compilerlibs406 jsonlib outcomeprinter reanalyze ))
You can’t perform that action at this time.
0 commit comments