Skip to content

Commit

Permalink
[CLI] make --quiet also disable the progress bar
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jvillard authored and facebook-github-bot committed Mar 26, 2020
1 parent fbeaf77 commit d4a154f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions infer/man/man1/infer-analyze.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions infer/man/man1/infer-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions infer/man/man1/infer-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions infer/man/man1/infer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions infer/src/base/Config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d4a154f

Please sign in to comment.