[nit] less indentation in Infer.log_build_cmd

Summary: a bit easier to read

Reviewed By: sblackshear

Differential Revision: D4409480

fbshipit-source-id: 8bee315
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent f7b03d53ce
commit 96c8133180

@ -363,7 +363,8 @@ let fail_on_issue_epilogue () =
| None -> ()
let log_build_cmd build_mode build_cmd =
if Config.debug_mode || Config.stats_mode then (
L.out "INFER_ARGS=%s@." (Option.value (Sys.getenv CLOpt.args_env_var) ~default:"<not found>");
L.out "Project root = %s@." Config.project_root;
let log_arg arg =
L.out "Arg: %s@\n" arg;
if (build_mode = Java || build_mode = Javac) && (String.is_prefix arg ~prefix:"@") then (
@ -377,7 +378,6 @@ let log_build_cmd build_mode build_cmd =
L.out " Error reading file '%s':@\n %a@." fname Exn.pp exn
) in
List.iter ~f:log_arg build_cmd
)
let () =
let build_cmd = IList.rev Config.rest in
@ -396,11 +396,11 @@ let () =
L.set_log_file_identifier Config.current_exe None ;
if Config.print_builtins then Builtin.print_and_exit () ;
if Config.is_originator then L.do_out "%s@\n" Config.version_string ;
if Config.debug_mode || Config.stats_mode then log_build_cmd build_mode build_cmd;
(* infer might be called from a Makefile and itself uses `make` to run the analysis in parallel,
but cannot communicate with the parent make command. Since infer won't interfere with them
anyway, pretend that we are not called from another make to prevent make falling back to a
mono-threaded execution. *)
log_build_cmd build_mode build_cmd;
Unix.unsetenv "MAKEFLAGS";
register_perf_stats_report () ;
touch_start_file () ;

Loading…
Cancel
Save