From a5393e9a37ac3d69b902b2c6ae295d8a85500339 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 31 Jul 2017 05:47:41 -0700 Subject: [PATCH] [diff] set reactive when `infer-diff` is invoked Summary: Automatically set --reactive because the diff analysis will be faster that way. Reviewed By: jeremydubreil Differential Revision: D5499443 fbshipit-source-id: 1a35cee --- infer/src/base/Config.ml | 2 +- infer/src/integration/Diff.ml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 4f1b76f02..a29f406d7 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -2097,7 +2097,7 @@ and quandary_sinks = !quandary_sinks and quiet = !quiet -and reactive_mode = !reactive +and reactive_mode = !reactive || CLOpt.(equal_command Diff) command and reactive_capture = !reactive_capture diff --git a/infer/src/integration/Diff.ml b/infer/src/integration/Diff.ml index 2e8bf6ad5..f44bbd7bc 100644 --- a/infer/src/integration/Diff.ml +++ b/infer/src/integration/Diff.ml @@ -48,16 +48,15 @@ let diff driver_mode = (* TODO(t15553258) run gen-build script if specified *) (* run capture *) Driver.capture driver_mode ~changed_files:None ; - (* run analysis TODO(t15553258) add --reactive and --changed_files_index *) + (* run analysis TODO(t15553258) add --changed_files_index *) Driver.analyze_and_report driver_mode ~changed_files:None ; let current_report = Some (save_report Current) in (* TODO(t15553258) bail if nothing to analyze (configurable, some people might care about bugs fixed more than about time to analyze) *) checkout Previous ; (* TODO(t15553258) run gen-build script if specified *) - (* run capture TODO(t15553258) add --reactive and --continue *) Driver.capture driver_mode ~changed_files:None ; - (* run analysis TODO(t15553258) add --reactive and --changed_files_index *) + (* run analysis TODO(t15553258) add --changed_files_index *) Driver.analyze_and_report driver_mode ~changed_files:None ; checkout Current ; let previous_report = Some (save_report Previous) in