From d4a154fea21bfa6be54cd2318f33d73297a9f125 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 26 Mar 2020 05:13:52 -0700 Subject: [PATCH] [CLI] make `--quiet` also disable the progress bar Summary: The documentation of `--quiet` dates back from when it applied only to `InferPrint.ml`. Make it more general and more in line with expectations one might have about a `--quiet` option: - change the doc - make it disable the progress bar Reviewed By: ngorogiannis Differential Revision: D20626110 fbshipit-source-id: db096fd31 --- infer/man/man1/infer-analyze.txt | 4 ++-- infer/man/man1/infer-full.txt | 5 ++--- infer/man/man1/infer-report.txt | 4 ++-- infer/man/man1/infer.txt | 5 ++--- infer/src/base/Config.ml | 4 ++-- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/infer/man/man1/infer-analyze.txt b/infer/man/man1/infer-analyze.txt index 3099ca267..6fccc62ff 100644 --- a/infer/man/man1/infer-analyze.txt +++ b/infer/man/man1/infer-analyze.txt @@ -252,8 +252,8 @@ OPTIONS (Conversely: --no-quandary-only) --quiet,-q - Activates: Do not print specs on standard output (default: only - print for the report command) (Conversely: --no-quiet | -Q) + Activates: Do not print anything on standard output. (Conversely: + --no-quiet | -Q) --no-racerd Deactivates: the RacerD thread safety analysis (Conversely: diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index d15188648..382e4a74d 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -894,9 +894,8 @@ OPTIONS Specify custom sources for Quandary See also infer-analyze(1). --quiet,-q - Activates: Do not print specs on standard output (default: only - print for the report command) (Conversely: --no-quiet | -Q) - See also infer-analyze(1) and infer-report(1). + Activates: Do not print anything on standard output. (Conversely: + --no-quiet | -Q) See also infer-analyze(1) and infer-report(1). --no-racerd Deactivates: the RacerD thread safety analysis (Conversely: diff --git a/infer/man/man1/infer-report.txt b/infer/man/man1/infer-report.txt index c574cbddf..444f58419 100644 --- a/infer/man/man1/infer-report.txt +++ b/infer/man/man1/infer-report.txt @@ -293,8 +293,8 @@ OPTIONS Specify the root directory of the project --quiet,-q - Activates: Do not print specs on standard output (default: only - print for the report command) (Conversely: --no-quiet | -Q) + Activates: Do not print anything on standard output. (Conversely: + --no-quiet | -Q) --report-blacklist-files-containing +string Do not report any issues on files containing the specified string diff --git a/infer/man/man1/infer.txt b/infer/man/man1/infer.txt index 5e491af1b..88f25b18e 100644 --- a/infer/man/man1/infer.txt +++ b/infer/man/man1/infer.txt @@ -894,9 +894,8 @@ OPTIONS Specify custom sources for Quandary See also infer-analyze(1). --quiet,-q - Activates: Do not print specs on standard output (default: only - print for the report command) (Conversely: --no-quiet | -Q) - See also infer-analyze(1) and infer-report(1). + Activates: Do not print anything on standard output. (Conversely: + --no-quiet | -Q) See also infer-analyze(1) and infer-report(1). --no-racerd Deactivates: the RacerD thread safety analysis (Conversely: diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index a83478b9b..de9a0a861 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -1861,7 +1861,7 @@ and quandary_sinks = and quiet = CLOpt.mk_bool ~long:"quiet" ~short:'q' ~default:false ~in_help:InferCommand.[(Analyze, manual_generic); (Report, manual_generic)] - "Do not print specs on standard output (default: only print for the $(b,report) command)" + "Do not print anything on standard output." and racerd_guardedby = @@ -2892,7 +2892,7 @@ and procedures_summary = !procedures_summary and process_clang_ast = !process_clang_ast and progress_bar = - if !progress_bar then + if !progress_bar && not !quiet then match !progress_bar_style with | `Auto when Unix.(isatty stdin && isatty stderr) -> `MultiLine