From 1c2aad9228362071ea9cb86e8876806830503ea4 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 19 Dec 2019 09:48:06 -0800 Subject: [PATCH] [driver] --merge should force merging in all cases Summary: methinks Reviewed By: ngorogiannis Differential Revision: D19175684 fbshipit-source-id: 8f516c3bc --- infer/src/integration/Driver.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index 9be9d76a8..e3eebbc10 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -398,13 +398,16 @@ let analyze_and_report ?suppress_console_report ~changed_files mode = let should_analyze = should_analyze && Config.capture in let should_merge = match mode with + | _ when Config.merge -> + (* [--merge] overrides other behaviors *) + true | PythonCapture (BBuck, _) when Config.flavors && InferCommand.equal Run Config.command -> (* if doing capture + analysis of buck with flavors, we always need to merge targets before the analysis phase *) true | Analyze | BuckGenruleMaster _ -> RunState.get_merge_capture () | _ -> - (* else rely on the command line value *) Config.merge + false in if should_merge then ( if Config.export_changed_functions then MergeCapture.merge_changed_functions () ;