Skip to content

Commit 3bd76e4

Browse files
committed
restore check on formatting
1 parent acdb6cc commit 3bd76e4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

analysis/src/Commands.ml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,14 @@ let rename ~path ~line ~col ~newName =
220220

221221
let format ~path =
222222
if Filename.check_suffix path ".res" then
223-
let {Res_driver.parsetree = structure; comments} =
223+
let {Res_driver.parsetree = structure; comments; diagnostics} =
224224
Res_driver.parsingEngine.parseImplementation ~forPrinter:true
225225
~filename:path
226226
in
227-
(* if List.length diagnostics > 0 then ""
228-
else *)
229-
Res_printer.printImplementation !Res_cli.ResClflags.width structure comments
227+
if List.length diagnostics > 0 then ""
228+
else
229+
Res_printer.printImplementation !Res_cli.ResClflags.width structure
230+
comments
230231
else if Filename.check_suffix path ".resi" then
231232
let {Res_driver.parsetree = signature; comments; diagnostics} =
232233
Res_driver.parsingEngine.parseInterface ~forPrinter:true ~filename:path

0 commit comments

Comments
 (0)