From 9670d3c7003e429820f44df73936c6a5973e0b07 Mon Sep 17 00:00:00 2001 From: Katie Ots Date: Wed, 18 Jul 2018 08:09:38 -0700 Subject: [PATCH] [Lint] Remove misleading error when running linters only Reviewed By: jvillard Differential Revision: D8821369 fbshipit-source-id: e35d08c8d --- infer/src/integration/Driver.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index fc164ed96..38fdf3710 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -375,10 +375,10 @@ let analyze_and_report ?suppress_console_report ~changed_files mode = (* else rely on the command line value *) Config.merge in if should_merge then MergeCapture.merge_captured_targets () ; - if should_analyze || should_report then ( - if SourceFiles.is_empty () then error_nothing_to_analyze mode - else if should_analyze then execute_analyze ~changed_files ; - if should_report && Config.report then report ?suppress_console:suppress_console_report () ) + if should_analyze then + if SourceFiles.is_empty () && Config.capture then error_nothing_to_analyze mode + else execute_analyze ~changed_files ; + if should_report && Config.report then report ?suppress_console:suppress_console_report () (** as the Config.fail_on_bug flag mandates, exit with error when an issue is reported *)