File tree Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ let main () =
90
90
| [_; " createInterface" ; path; cmiFile] ->
91
91
Printf. printf " \" %s\" "
92
92
(Json. escape (CreateInterface. command ~path ~cmi File))
93
- | [_; " format" ; path] -> Commands. format ~path
93
+ | [_; " format" ; path] ->
94
+ Printf. printf " \" %s\" " (Json. escape (Commands. format ~path ))
94
95
| [_; " test" ; path] -> Commands. test ~path
95
96
| args when List. mem " -h" args || List. mem " --help" args -> prerr_endline help
96
97
| _ ->
Original file line number Diff line number Diff line change @@ -256,14 +256,13 @@ let format ~path =
256
256
Res_driver. parsingEngine.parseImplementation ~for Printer:true
257
257
~filename: path
258
258
in
259
- Res_driver. printEngine.printImplementation ! Res_cli.ResClflags. width path
260
- comments structure
259
+ Res_printer. printImplementation ! Res_cli.ResClflags. width structure comments
261
260
else if Filename. check_suffix path " .resi" then
262
261
let {Res_driver. parsetree = signature; comments} =
263
262
Res_driver. parsingEngine.parseInterface ~for Printer:true ~filename: path
264
263
in
265
- Res_driver. printEngine. printInterface ! Res_cli.ResClflags. width path
266
- comments signature
264
+ Res_printer. printInterface ! Res_cli.ResClflags. width signature comments
265
+ else " "
267
266
268
267
let test ~path =
269
268
Uri2. stripPath := true ;
Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ export let formatUsingValidBscNativePath = (
121
121
let result = runAnalysisAfterSanityCheck (
122
122
formatTempFileFullPath ,
123
123
[ "format" , formatTempFileFullPath ] ,
124
- false ,
125
124
false
126
125
) ;
127
126
@@ -144,8 +143,7 @@ export let formatUsingValidBscNativePath = (
144
143
export let runAnalysisAfterSanityCheck = (
145
144
filePath : p . DocumentUri ,
146
145
args : Array < any > ,
147
- projectRequired = false ,
148
- parseJson = true
146
+ projectRequired = false
149
147
) => {
150
148
let binaryPath ;
151
149
if ( fs . existsSync ( c . analysisDevPath ) ) {
@@ -166,11 +164,7 @@ export let runAnalysisAfterSanityCheck = (
166
164
} ;
167
165
let stdout = childProcess . execFileSync ( binaryPath , args , options ) ;
168
166
169
- if ( parseJson ) {
170
- return JSON . parse ( stdout . toString ( ) ) ;
171
- } else {
172
- return stdout . toString ( ) ;
173
- }
167
+ return JSON . parse ( stdout . toString ( ) ) ;
174
168
} ;
175
169
176
170
export let runAnalysisCommand = (
You can’t perform that action at this time.
0 commit comments