[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
master
Jules Villard 5 years ago committed by Facebook GitHub Bot
parent fbeaf7731a
commit d4a154fea2

@ -252,8 +252,8 @@ OPTIONS
(Conversely: --no-quandary-only) (Conversely: --no-quandary-only)
--quiet,-q --quiet,-q
Activates: Do not print specs on standard output (default: only Activates: Do not print anything on standard output. (Conversely:
print for the report command) (Conversely: --no-quiet | -Q) --no-quiet | -Q)
--no-racerd --no-racerd
Deactivates: the RacerD thread safety analysis (Conversely: Deactivates: the RacerD thread safety analysis (Conversely:

@ -894,9 +894,8 @@ OPTIONS
Specify custom sources for Quandary See also infer-analyze(1). Specify custom sources for Quandary See also infer-analyze(1).
--quiet,-q --quiet,-q
Activates: Do not print specs on standard output (default: only Activates: Do not print anything on standard output. (Conversely:
print for the report command) (Conversely: --no-quiet | -Q) --no-quiet | -Q) See also infer-analyze(1) and infer-report(1).
See also infer-analyze(1) and infer-report(1).
--no-racerd --no-racerd
Deactivates: the RacerD thread safety analysis (Conversely: Deactivates: the RacerD thread safety analysis (Conversely:

@ -293,8 +293,8 @@ OPTIONS
Specify the root directory of the project Specify the root directory of the project
--quiet,-q --quiet,-q
Activates: Do not print specs on standard output (default: only Activates: Do not print anything on standard output. (Conversely:
print for the report command) (Conversely: --no-quiet | -Q) --no-quiet | -Q)
--report-blacklist-files-containing +string --report-blacklist-files-containing +string
Do not report any issues on files containing the specified string Do not report any issues on files containing the specified string

@ -894,9 +894,8 @@ OPTIONS
Specify custom sources for Quandary See also infer-analyze(1). Specify custom sources for Quandary See also infer-analyze(1).
--quiet,-q --quiet,-q
Activates: Do not print specs on standard output (default: only Activates: Do not print anything on standard output. (Conversely:
print for the report command) (Conversely: --no-quiet | -Q) --no-quiet | -Q) See also infer-analyze(1) and infer-report(1).
See also infer-analyze(1) and infer-report(1).
--no-racerd --no-racerd
Deactivates: the RacerD thread safety analysis (Conversely: Deactivates: the RacerD thread safety analysis (Conversely:

@ -1861,7 +1861,7 @@ and quandary_sinks =
and quiet = and quiet =
CLOpt.mk_bool ~long:"quiet" ~short:'q' ~default:false CLOpt.mk_bool ~long:"quiet" ~short:'q' ~default:false
~in_help:InferCommand.[(Analyze, manual_generic); (Report, manual_generic)] ~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 = and racerd_guardedby =
@ -2892,7 +2892,7 @@ and procedures_summary = !procedures_summary
and process_clang_ast = !process_clang_ast and process_clang_ast = !process_clang_ast
and progress_bar = and progress_bar =
if !progress_bar then if !progress_bar && not !quiet then
match !progress_bar_style with match !progress_bar_style with
| `Auto when Unix.(isatty stdin && isatty stderr) -> | `Auto when Unix.(isatty stdin && isatty stderr) ->
`MultiLine `MultiLine

Loading…
Cancel
Save