From c287afe07de09b519e6d26dec512a6ace241682c Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Tue, 18 May 2021 03:41:27 -0700 Subject: [PATCH] [logging] fix always zero count for modified files Summary: The counter that accumulates the number of modified source files was logged before it is computed, leading to always zero results. Reviewed By: jvillard Differential Revision: D28505378 fbshipit-source-id: 833fb6072 --- infer/src/backend/InferAnalyze.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/backend/InferAnalyze.ml b/infer/src/backend/InferAnalyze.ml index 1039349c8..f8a61af53 100644 --- a/infer/src/backend/InferAnalyze.ml +++ b/infer/src/backend/InferAnalyze.ml @@ -117,8 +117,8 @@ let get_source_files_to_analyze ~changed_files = if result then incr n_source_files_to_analyze ; result in - ScubaLogging.log_count ~label:"source_files_to_analyze" ~value:!n_source_files_to_analyze ; let source_files_to_analyze = SourceFiles.get_all ~filter () in + ScubaLogging.log_count ~label:"source_files_to_analyze" ~value:!n_source_files_to_analyze ; let pp_n_source_files ~n_total fmt n_to_analyze = let pp_total_if_not_all fmt n_total = if Config.reactive_mode || Option.is_some changed_files then