[help] scrub default values in the checked-in version of the manuals

Summary:
The default values of config options can sometimes depend on build-time
configuration values. This makes checking that the manuals "remain the same"
trickier as the manuals can be different depending on the platform. This
removes *all* default values from the checked-in manuals. We could be more
fine-grained and scrub only the values that are susceptible to change but for
now this is probably good enough.

This is done by implementing new options `--help-scrubbed` and
`--help-scrubbed-full` and using these in our tests instead of `--help` and
`--help-full` (which remain unaffected).

Also don't wrap the default values in `$(i,...)` anymore because the defaults
can trigger line breaks and then the man page is ill-formatted because that
format is stupid.

Reviewed By: mityal

Differential Revision: D16543779

fbshipit-source-id: bc929ff8c
master
Jules Villard 5 years ago committed by Facebook Github Bot
parent e320d8a580
commit 8bdc03bba4

@ -280,23 +280,23 @@ endif
$(INFER_COMMAND_MANUALS): src_build $(MAKEFILE_LIST)
$(QUIET)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) $(patsubst infer-%.1,%,$(@F)) --help --help-format=groff > $@
$(QUIET)$(INFER_BIN) $(patsubst infer-%.1,%,$(@F)) --help-scrubbed --help-format=groff > $@
$(INFER_COMMAND_TEXT_MANUALS): src_build $(MAKEFILE_LIST)
$(QUIET)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) $(patsubst infer-%.txt,%,$(@F)) --help --help-format=plain > $@
$(QUIET)$(INFER_BIN) $(patsubst infer-%.txt,%,$(@F)) --help-scrubbed --help-format=plain > $@
$(INFER_MANUAL): src_build $(MAKEFILE_LIST)
$(QUIET)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) --help --help-format=groff > $@
$(QUIET)$(INFER_BIN) --help-scrubbed --help-format=groff > $@
$(INFER_TEXT_MANUAL): src_build $(MAKEFILE_LIST)
$(QUIET)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) --help --help-format=plain > $@
$(QUIET)$(INFER_BIN) --help-scrubbed --help-format=plain > $@
$(INFER_FULL_TEXT_MANUAL): src_build $(MAKEFILE_LIST)
$(QUIET)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) --help-full --help-format=plain > $@
$(QUIET)$(INFER_BIN) --help-scrubbed-full --help-format=plain > $@
$(INFER_GROFF_MANUALS_GZIPPED): %.gz: %
$(QUIET)$(REMOVE) $@

@ -69,7 +69,7 @@ OPTIONS
(Conversely: --no-cost-only)
--custom-symbols json
Specify named lists of symbols available to rules (default: [])
Specify named lists of symbols available to rules
--debug,-g
Activates: Debug mode (also sets --debug-level 2,
@ -86,15 +86,15 @@ OPTIONS
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0)
values.
--no-default-checkers
Deactivates: Default checkers: --biabduction,
@ -125,7 +125,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto)
to pager otherwise.
--help-full
Show this manual with all internal options in the INTERNAL OPTIONS
@ -151,8 +151,7 @@ OPTIONS
other checkers (Conversely: --no-inefficient-keyset-iterator-only)
--jobs,-j int
Run the specified number of analysis jobs simultaneously (default:
<number of cores>)
Run the specified number of analysis jobs simultaneously
--keep-going
Activates: Keep going when the analysis encounters a failure
@ -220,10 +219,10 @@ OPTIONS
--progress-bar-style { auto | plain | multiline }
Style of the progress bar. auto selects multiline if connected to
a tty, otherwise plain. (default: auto)
a tty, otherwise plain.
--project-root,-C dir
Specify the root directory of the project (default: .)
Specify the root directory of the project
--pulse
Activates: [EXPERIMENTAL] C++ lifetime analysis (Conversely:
@ -284,12 +283,10 @@ OPTIONS
--report-hook script
Specify a script to be executed after the analysis results are
written. This script will be passed, --issues-json, --issues-txt,
--issues-xml, --project-root, and --results-dir. (default: <infer
installation directory>/lib/python/report.py)
--issues-xml, --project-root, and --results-dir.
--results-dir,-o dir
Write results and internal files in the specified directory
(default: ./infer-out)
--no-siof
Deactivates: the Static Initialization Order Fiasco analysis (C++
@ -301,7 +298,6 @@ OPTIONS
--sqlite-lock-timeout int
Timeout for SQLite results database operations, in milliseconds.
(default: five seconds times number of cores)
--no-starvation
Deactivates: starvation analysis (Conversely: --starvation)
@ -323,7 +319,7 @@ BUCK FLAVORS OPTIONS
dependency file (Conversely: --no-merge)
BUFFER OVERRUN OPTIONS
--bo-debug int
Debug level for buffer-overrun checker (0-4) (default: 0)
Debug level for buffer-overrun checker (0-4)
--bo-relational-domain { oct | poly }
Select a relational domain being used in the bufferoverrun checker
@ -352,28 +348,28 @@ CLANG OPTIONS
issue for every function whose source path starts with "isolated/"
that may reach the function named "connect", ignoring paths that
go through a symbol starting with "Trusted::".
(default: [])
--annotation-reachability-cxx-sources json
Override sources in all cxx annotation reachability specs with the
given sources spec (default: [])
given sources spec
--cxx-scope-guards json
Specify scope guard classes that can be read only by destructors
without being reported as dead stores. (default: [])
without being reported as dead stores.
--liveness-dangerous-classes json
Specify classes where the destructor should be ignored when
computing liveness. In other words, assignement to variables of
these types (or common wrappers around these types such as
unique_ptr<type>) will count as dead stores when the variables are
not read explicitly by the program. (default: [])
not read explicitly by the program.
--ml-buckets ,-separated sequence of { all | cf | arc | narc | cpp |
unknown_origin }
Specify the memory leak buckets to be checked in C++:
- cpp from C++ code
(default: cf)
--unsafe-malloc
Activates: Assume that malloc(3) never returns null. (Conversely:
@ -384,7 +380,6 @@ JAVA OPTIONS
checker Example format: for custom annotations
com.my.annotation.{Source1,Source2,Sink1}
{ "sources" : ["Source1", "Source2"], "sink" : "Sink1" }
(default: [])
--external-java-packages +prefix
Specify a list of Java package prefixes for external Java
@ -392,16 +387,16 @@ JAVA OPTIONS
warnings on those packages.
QUANDARY CHECKER OPTIONS
--quandary-endpoints json
Specify endpoint classes for Quandary (default: [])
Specify endpoint classes for Quandary
--quandary-sanitizers json
Specify custom sanitizers for Quandary (default: [])
Specify custom sanitizers for Quandary
--quandary-sinks json
Specify custom sinks for Quandary (default: [])
Specify custom sinks for Quandary
--quandary-sources json
Specify custom sources for Quandary (default: [])
Specify custom sources for Quandary
RACERD CHECKER OPTIONS
--racerd-guardedby
Activates: Check @GuardedBy annotations with RacerD (Conversely:
@ -409,7 +404,7 @@ RACERD CHECKER OPTIONS
--threadsafe-aliases json
Specify custom annotations that should be considered aliases of
@ThreadSafe (default: [])
@ThreadSafe
SIOF CHECKER OPTIONS
--siof-check-iostreams
Activates: Do not assume that iostreams (cout, cerr, ...) are

@ -39,15 +39,15 @@ OPTIONS
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0)
values.
--force-delete-results-dir
Activates: Do not refuse to delete the results directory if it
@ -66,7 +66,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto)
to pager otherwise.
--help-full
Show this manual with all internal options in the INTERNAL OPTIONS
@ -82,14 +82,13 @@ OPTIONS
--progress-bar-style { auto | plain | multiline }
Style of the progress bar. auto selects multiline if connected to
a tty, otherwise plain. (default: auto)
a tty, otherwise plain.
--project-root,-C dir
Specify the root directory of the project (default: .)
Specify the root directory of the project
--results-dir,-o dir
Write results and internal files in the specified directory
(default: ./infer-out)
--skip-analysis-in-path +path_prefix_OCaml_regex
Ignore files whose path matches the given prefix (can be specified
@ -97,7 +96,6 @@ OPTIONS
--sqlite-lock-timeout int
Timeout for SQLite results database operations, in milliseconds.
(default: five seconds times number of cores)
-- Stop argument processing, use remaining arguments as a build
command
@ -148,7 +146,7 @@ BUCK FOR JAVA OPTIONS
CLANG LINTERS OPTIONS
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0)
values.
--no-default-linters
Deactivates: Use the default linters for the analysis.
@ -197,12 +195,10 @@ CLANG OPTIONS
Specify a file containing the AST of the program, in biniou format
--clang-blacklisted-flags +string
Clang flags to filter out (default:
--expt-relaxed-constexpr,-fembed-bitcode-marker,-fno-absolute-module-directory,-fno-canonical-system-headers)
Clang flags to filter out
--clang-blacklisted-flags-with-arg +string
Clang flags (taking args) to filter out (default:
-index-store-path,-mllvm)
Clang flags (taking args) to filter out
--compilation-database +path
File that contain compilation commands (can be specified multiple

@ -29,15 +29,15 @@ OPTIONS
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0)
values.
--force-delete-results-dir
Activates: Do not refuse to delete the results directory if it
@ -50,7 +50,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto)
to pager otherwise.
--help-full
Show this manual with all internal options in the INTERNAL OPTIONS

@ -27,7 +27,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto)
to pager otherwise.
--help-full
Show this manual with all internal options in the INTERNAL OPTIONS
@ -35,7 +35,6 @@ OPTIONS
--results-dir,-o dir
Write results and internal files in the specified directory
(default: ./infer-out)
EXPLORE BUGS
--html
Activates: Generate html report. (Conversely: --no-html)

@ -67,7 +67,6 @@ OPTIONS
checker Example format: for custom annotations
com.my.annotation.{Source1,Source2,Sink1}
{ "sources" : ["Source1", "Source2"], "sink" : "Sink1" }
(default: [])
See also infer-analyze(1).
--annotation-reachability-cxx json
@ -93,12 +92,12 @@ OPTIONS
issue for every function whose source path starts with "isolated/"
that may reach the function named "connect", ignoring paths that
go through a symbol starting with "Trusted::".
(default: [])
See also infer-analyze(1).
--annotation-reachability-cxx-sources json
Override sources in all cxx annotation reachability specs with the
given sources spec (default: []) See also infer-analyze(1).
given sources spec See also infer-analyze(1).
--annotation-reachability-only
Activates: Enable --annotation-reachability and disable all other
@ -119,8 +118,7 @@ OPTIONS
(Conversely: --no-biabduction-only) See also infer-analyze(1).
--bo-debug int
Debug level for buffer-overrun checker (0-4) (default: 0)
See also infer-analyze(1).
Debug level for buffer-overrun checker (0-4) See also infer-analyze(1).
--bo-relational-domain { oct | poly }
Select a relational domain being used in the bufferoverrun checker
@ -193,13 +191,10 @@ OPTIONS
See also infer-capture(1).
--clang-blacklisted-flags +string
Clang flags to filter out (default:
--expt-relaxed-constexpr,-fembed-bitcode-marker,-fno-absolute-module-directory,-fno-canonical-system-headers)
See also infer-capture(1).
Clang flags to filter out See also infer-capture(1).
--clang-blacklisted-flags-with-arg +string
Clang flags (taking args) to filter out (default:
-index-store-path,-mllvm) See also infer-capture(1).
Clang flags (taking args) to filter out See also infer-capture(1).
--class-loads
Activates: Java class loading analysis (Conversely:
@ -250,8 +245,7 @@ OPTIONS
See also infer-diff(1).
--custom-symbols json
Specify named lists of symbols available to rules (default: [])
See also infer-analyze(1).
Specify named lists of symbols available to rules See also infer-analyze(1).
--no-cxx
Deactivates: Analyze C++ methods (Conversely: --cxx)
@ -265,8 +259,7 @@ OPTIONS
--cxx-scope-guards json
Specify scope guard classes that can be read only by destructors
without being reported as dead stores. (default: [])
See also infer-analyze(1).
without being reported as dead stores. See also infer-analyze(1).
--debug,-g
Activates: Debug mode (also sets --debug-level 2,
@ -289,19 +282,19 @@ OPTIONS
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. (default: 0) See also infer-analyze(1), infer-capture(1), infer-compile(1),
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-diff(1), infer-events(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. (default: 0) See also infer-analyze(1), infer-capture(1), infer-compile(1),
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-diff(1), infer-events(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0) See also infer-analyze(1), infer-capture(1), infer-compile(1),
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-diff(1), infer-events(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).
@ -595,7 +588,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto) See also infer-analyze(1), infer-capture(1), infer-compile(1),
to pager otherwise. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-diff(1), infer-events(1), infer-explore(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).
@ -646,8 +639,7 @@ OPTIONS
qualifier | severity | line | column | procedure |
procedure_start_line | file | bug_trace | key | hash | line_offset |
qualifier_contains_potential_exception_note }
Fields to emit with --issues-tests (default: file procedure
line_offset bug_type bucket severity bug_trace) See also infer-report(1).
Fields to emit with --issues-tests See also infer-report(1).
--issues-tests file
Write a list of issues in a format suitable for tests to file
@ -662,8 +654,8 @@ OPTIONS
See also infer-capture(1).
--jobs,-j int
Run the specified number of analysis jobs simultaneously (default:
<number of cores>) See also infer-analyze(1).
Run the specified number of analysis jobs simultaneously
See also infer-analyze(1).
--keep-going
Activates: Keep going when the analysis encounters a failure
@ -728,7 +720,7 @@ OPTIONS
computing liveness. In other words, assignement to variables of
these types (or common wrappers around these types such as
unique_ptr<type>) will count as dead stores when the variables are
not read explicitly by the program. (default: []) See also infer-analyze(1).
not read explicitly by the program. See also infer-analyze(1).
--liveness-only
Activates: Enable --liveness and disable all other checkers
@ -769,7 +761,7 @@ OPTIONS
unknown_origin }
Specify the memory leak buckets to be checked in C++:
- cpp from C++ code
(default: cf)
See also infer-analyze(1).
--nullsafe
@ -862,11 +854,10 @@ OPTIONS
--progress-bar-style { auto | plain | multiline }
Style of the progress bar. auto selects multiline if connected to
a tty, otherwise plain. (default: auto) See also infer-analyze(1) and infer-capture(1).
a tty, otherwise plain. See also infer-analyze(1) and infer-capture(1).
--project-root,-C dir
Specify the root directory of the project (default: .)
See also infer-analyze(1), infer-capture(1), infer-report(1), and
Specify the root directory of the project See also infer-analyze(1), infer-capture(1), infer-report(1), and
infer-run(1).
--pulse
@ -890,22 +881,20 @@ OPTIONS
See also infer-analyze(1).
--quandary-endpoints json
Specify endpoint classes for Quandary (default: [])
See also infer-analyze(1).
Specify endpoint classes for Quandary See also infer-analyze(1).
--quandary-only
Activates: Enable --quandary and disable all other checkers
(Conversely: --no-quandary-only) See also infer-analyze(1).
--quandary-sanitizers json
Specify custom sanitizers for Quandary (default: [])
See also infer-analyze(1).
Specify custom sanitizers for Quandary See also infer-analyze(1).
--quandary-sinks json
Specify custom sinks for Quandary (default: []) See also infer-analyze(1).
Specify custom sinks for Quandary See also infer-analyze(1).
--quandary-sources json
Specify custom sources for Quandary (default: []) See also infer-analyze(1).
Specify custom sources for Quandary See also infer-analyze(1).
--quandaryBO
Activates: [EXPERIMENTAL] The quandaryBO tainted buffer access
@ -959,14 +948,12 @@ OPTIONS
See also infer-analyze(1) and infer-run(1).
--report-formatter { none | phabricator }
Which formatter to use when emitting the report (default:
phabricator) See also infer-report(1).
Which formatter to use when emitting the report See also infer-report(1).
--report-hook script
Specify a script to be executed after the analysis results are
written. This script will be passed, --issues-json, --issues-txt,
--issues-xml, --project-root, and --results-dir. (default: <infer
installation directory>/lib/python/report.py) See also infer-analyze(1) and infer-run(1).
--issues-xml, --project-root, and --results-dir. See also infer-analyze(1) and infer-run(1).
--report-previous path
Report of the base revision to use for comparison See also infer-reportdiff(1).
@ -975,8 +962,8 @@ OPTIONS
do not report a type of errors See also infer-report(1) and infer-run(1).
--results-dir,-o dir
Write results and internal files in the specified directory
(default: ./infer-out) See also infer-analyze(1), infer-capture(1), infer-explore(1),
Write results and internal files in the specified directory
See also infer-analyze(1), infer-capture(1), infer-explore(1),
infer-report(1), and infer-run(1).
--select N
@ -1057,8 +1044,8 @@ OPTIONS
(Conversely: --source-preview) See also infer-explore(1).
--sqlite-lock-timeout int
Timeout for SQLite results database operations, in milliseconds.
(default: five seconds times number of cores) See also infer-analyze(1), infer-capture(1), and infer-run(1).
Timeout for SQLite results database operations, in milliseconds.
See also infer-analyze(1), infer-capture(1), and infer-run(1).
--no-starvation
Deactivates: starvation analysis (Conversely: --starvation)
@ -1070,7 +1057,7 @@ OPTIONS
--threadsafe-aliases json
Specify custom annotations that should be considered aliases of
@ThreadSafe (default: []) See also infer-analyze(1).
@ThreadSafe See also infer-analyze(1).
--no-uninit
Deactivates: checker for use of uninitialized values (Conversely:
@ -1121,13 +1108,13 @@ INTERNAL OPTIONS
Specify abstraction level for fields of structs: - 0 = no
- 1 = forget some fields during matching (and so lseg
abstraction)
(default: 1)
--abs-val int
Specify abstraction level for expressions: - 0 = no abstraction
- 1 = evaluate all expressions abstractly
- 2 = 1 + abstract constant integer values during join
(default: 2)
--allow-leak
Activates: Forget leaked memory during abstraction (Conversely:
@ -1146,14 +1133,14 @@ INTERNAL OPTIONS
- 1 = assumes that the size of every array is infinite
- 2 = assumes that all heap dereferences via array indexing and
pointer arithmetic are correct
(default: 0)
--backtrack-level int
Maximum level of backtracking to convert an absolute path to path
relative to the common prefix between the project root and the
path. For instance, with bactraking level 1, it will convert
/my/source/File.java with project root /my/root into
../source/File.java (default: 0)
../source/File.java
--bo-relational-domain-reset
Cancel the effect of --bo-relational-domain.
@ -1279,7 +1266,7 @@ INTERNAL OPTIONS
--debug-level-test-determinator int
Debug level for the test determinator. See --debug-level for
accepted values. (default: 0)
accepted values.
--developer-mode
Activates: Show internal exceptions (Conversely:
@ -1293,7 +1280,7 @@ INTERNAL OPTIONS
Specify which set of the differential results is filtered with the
modified files provided through the --differential-modified-files
argument. By default it is applied to all sets (introduced, fixed,
and preexisting) (default: introduced fixed preexisting)
and preexisting)
--disable-issue-type-reset
Set --disable-issue-type to the empty list.
@ -1338,8 +1325,7 @@ INTERNAL OPTIONS
(Conversely: --no-export-changed-functions)
--export-changed-functions-output path
Name of file for export-changed-functions results (default:
changed_functions.json)
Name of file for export-changed-functions results
--external-java-packages-reset
Set --external-java-packages to the empty list.
@ -1390,6 +1376,13 @@ INTERNAL OPTIONS
Activates: Enable the genrule compatibility mode used for the Buck
integration (Conversely: --no-genrule-mode)
--help-scrubbed
Show this manual without specifying default values induced by the
current build configuration
--help-scrubbed-full
Show the scrubbed manual with all internal options
--icfg-dotty-outfile path
If set, specifies path where .dot file should be written, it
overrides the path for all other options that would generate icfg
@ -1418,7 +1411,7 @@ INTERNAL OPTIONS
--iterations int
Specify the maximum number of operations for each function,
expressed as a multiple of symbolic operations and a multiple of
seconds of elapsed time (default: 1)
seconds of elapsed time
--java-jar-compiler-reset
Cancel the effect of --java-jar-compiler.
@ -1433,7 +1426,7 @@ INTERNAL OPTIONS
Set the strength of the final information-loss check used by the
join: - 0 = use the most aggressive join for preconditions
- 1 = use the least aggressive join for preconditions
(default: 1)
--linter-reset
Cancel the effect of --linter.
@ -1451,10 +1444,10 @@ INTERNAL OPTIONS
Cancel the effect of --load-average.
--log-file file
Specify the file to use for logging (default: logs)
Specify the file to use for logging
--margin int
Set right margin for the pretty printing functions (default: 100)
Set right margin for the pretty printing functions
--max-nesting-reset
Cancel the effect of --max-nesting.
@ -1464,7 +1457,7 @@ INTERNAL OPTIONS
analysis. (Conversely: --no-memcached)
--memcached-size-mb int
EXPERIMENTAL: Default memcached size in megabytes. (default: 2048)
EXPERIMENTAL: Default memcached size in megabytes.
--method-decls-info method_decls_info.json
Specifies the file containing the method declarations info (eg.
@ -1476,7 +1469,7 @@ INTERNAL OPTIONS
--modeled-expensive json
Matcher or list of matchers for methods that should be considered
expensive by the performance critical checker. (default: [])
expensive by the performance critical checker.
--models-mode
Activates: Mode for analyzing the models (Conversely:
@ -1498,7 +1491,6 @@ INTERNAL OPTIONS
--never-returning-null json
Matcher or list of matchers for functions that never return null.
(default: [])
--nullable-annotation-name string
Specify custom nullable annotation name
@ -1563,7 +1555,7 @@ INTERNAL OPTIONS
--procedures-per-process int
Specify the number of procedures to analyze per process when using
--per-procedure-parallelism. If 0 is specified, each file is
divided into --jobs groups of procedures. (default: 1000)
divided into --jobs groups of procedures.
--procs-csv file
Write statistics for each procedure in CSV format to a file
@ -1579,11 +1571,10 @@ INTERNAL OPTIONS
Cancel the effect of --profiler-samples.
--pulse-max-disjuncts int
Under-approximate after int disjunctions in the domain (default:
20)
Under-approximate after int disjunctions in the domain
--pulse-widen-threshold int
Under-approximate after int loop iterations (default: 3)
Under-approximate after int loop iterations
--pure-by-default
Activates: [Purity]Consider unknown functions to be pure by
@ -1653,11 +1644,11 @@ INTERNAL OPTIONS
--skip-implementation json
Matcher or list of matchers for names of files where we only want
to translate the method declaration, skipping the body of the
methods (Java only). (default: [])
methods (Java only).
--skip-translation json
Matcher or list of matchers for names of files that should not be
analyzed at all. (default: [])
analyzed at all.
--skip-translation-headers-reset
Set --skip-translation-headers to the empty list.
@ -1681,7 +1672,7 @@ INTERNAL OPTIONS
Set the level of abstracting the postconditions of discovered
specs: - 0 = nothing special
- 1 = filter out redundant posts implied by other posts
(default: 1)
--specs-library,-L +dir|jar
Search for .spec files in given directory or jar file
@ -1697,7 +1688,7 @@ INTERNAL OPTIONS
--starvation-skip-analysis json
Specify combinations of class/method list that should be skipped
during starvation analysis (default: [])
during starvation analysis
--no-starvation-strict-mode
Deactivates: During starvation analysis, report strict mode
@ -1731,8 +1722,7 @@ INTERNAL OPTIONS
--no-test-determinator)
--test-determinator-output path
Name of file for test-determinator results (default:
test_determinator.json)
Name of file for test-determinator results
--test-filtering
Activates: List all the files Infer can report on (should be
@ -1783,11 +1773,11 @@ INTERNAL OPTIONS
Cancel the effect of --tv-commit.
--tv-limit int
The maximum number of traces to submit to Traceview (default: 100)
The maximum number of traces to submit to Traceview
--tv-limit-filtered int
The maximum number of traces for issues filtered out by
--report-filter to submit to Traceview (default: 100)
--report-filter to submit to Traceview
--type-size
Activates: Consider the size of types during analysis, e.g. cannot

@ -50,15 +50,15 @@ OPTIONS
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0)
values.
--differential-filter-files string
Specify the file containing the list of source files for which a
@ -261,7 +261,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto)
to pager otherwise.
--help-full
Show this manual with all internal options in the INTERNAL OPTIONS
@ -271,8 +271,7 @@ OPTIONS
qualifier | severity | line | column | procedure |
procedure_start_line | file | bug_trace | key | hash | line_offset |
qualifier_contains_potential_exception_note }
Fields to emit with --issues-tests (default: file procedure
line_offset bug_type bucket severity bug_trace)
Fields to emit with --issues-tests
--issues-tests file
Write a list of issues in a format suitable for tests to file
@ -286,7 +285,7 @@ OPTIONS
--no-print-logs)
--project-root,-C dir
Specify the root directory of the project (default: .)
Specify the root directory of the project
--quiet,-q
Activates: Do not print specs on standard output (default: only
@ -302,15 +301,13 @@ OPTIONS
--<analyzer>-whitelist-path-regex)
--report-formatter { none | phabricator }
Which formatter to use when emitting the report (default:
phabricator)
Which formatter to use when emitting the report
--report-suppress-errors +error_name
do not report a type of errors
--results-dir,-o dir
Write results and internal files in the specified directory
(default: ./infer-out)
--skip-analysis-in-path-skips-compilation
Activates: Whether paths in --skip-analysis-in-path should be

@ -41,15 +41,15 @@ OPTIONS
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0)
values.
--file-renamings path
JSON with a list of file renamings to use while computing
@ -61,7 +61,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto)
to pager otherwise.
--help-full
Show this manual with all internal options in the INTERNAL OPTIONS

@ -51,15 +51,15 @@ OPTIONS
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. (default: 0)
values.
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0)
values.
--fail-on-issue
Activates: Exit with error code 2 if Infer found something to
@ -82,7 +82,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto)
to pager otherwise.
--help-full
Show this manual with all internal options in the INTERNAL OPTIONS
@ -113,7 +113,7 @@ OPTIONS
Deactivates: Show a progress bar (Conversely: --progress-bar | -p)
--project-root,-C dir
Specify the root directory of the project (default: .)
Specify the root directory of the project
--no-report
Deactivates: Run the reporting phase once the analysis has
@ -135,15 +135,13 @@ OPTIONS
--report-hook script
Specify a script to be executed after the analysis results are
written. This script will be passed, --issues-json, --issues-txt,
--issues-xml, --project-root, and --results-dir. (default: <infer
installation directory>/lib/python/report.py)
--issues-xml, --project-root, and --results-dir.
--report-suppress-errors +error_name
do not report a type of errors
--results-dir,-o dir
Write results and internal files in the specified directory
(default: ./infer-out)
--skip-analysis-in-path +path_prefix_OCaml_regex
Ignore files whose path matches the given prefix (can be specified
@ -151,7 +149,6 @@ OPTIONS
--sqlite-lock-timeout int
Timeout for SQLite results database operations, in milliseconds.
(default: five seconds times number of cores)
--version
Print version information and exit

@ -67,7 +67,6 @@ OPTIONS
checker Example format: for custom annotations
com.my.annotation.{Source1,Source2,Sink1}
{ "sources" : ["Source1", "Source2"], "sink" : "Sink1" }
(default: [])
See also infer-analyze(1).
--annotation-reachability-cxx json
@ -93,12 +92,12 @@ OPTIONS
issue for every function whose source path starts with "isolated/"
that may reach the function named "connect", ignoring paths that
go through a symbol starting with "Trusted::".
(default: [])
See also infer-analyze(1).
--annotation-reachability-cxx-sources json
Override sources in all cxx annotation reachability specs with the
given sources spec (default: []) See also infer-analyze(1).
given sources spec See also infer-analyze(1).
--annotation-reachability-only
Activates: Enable --annotation-reachability and disable all other
@ -119,8 +118,7 @@ OPTIONS
(Conversely: --no-biabduction-only) See also infer-analyze(1).
--bo-debug int
Debug level for buffer-overrun checker (0-4) (default: 0)
See also infer-analyze(1).
Debug level for buffer-overrun checker (0-4) See also infer-analyze(1).
--bo-relational-domain { oct | poly }
Select a relational domain being used in the bufferoverrun checker
@ -193,13 +191,10 @@ OPTIONS
See also infer-capture(1).
--clang-blacklisted-flags +string
Clang flags to filter out (default:
--expt-relaxed-constexpr,-fembed-bitcode-marker,-fno-absolute-module-directory,-fno-canonical-system-headers)
See also infer-capture(1).
Clang flags to filter out See also infer-capture(1).
--clang-blacklisted-flags-with-arg +string
Clang flags (taking args) to filter out (default:
-index-store-path,-mllvm) See also infer-capture(1).
Clang flags (taking args) to filter out See also infer-capture(1).
--class-loads
Activates: Java class loading analysis (Conversely:
@ -250,8 +245,7 @@ OPTIONS
See also infer-diff(1).
--custom-symbols json
Specify named lists of symbols available to rules (default: [])
See also infer-analyze(1).
Specify named lists of symbols available to rules See also infer-analyze(1).
--no-cxx
Deactivates: Analyze C++ methods (Conversely: --cxx)
@ -265,8 +259,7 @@ OPTIONS
--cxx-scope-guards json
Specify scope guard classes that can be read only by destructors
without being reported as dead stores. (default: [])
See also infer-analyze(1).
without being reported as dead stores. See also infer-analyze(1).
--debug,-g
Activates: Debug mode (also sets --debug-level 2,
@ -289,19 +282,19 @@ OPTIONS
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. (default: 0) See also infer-analyze(1), infer-capture(1), infer-compile(1),
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-diff(1), infer-events(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. (default: 0) See also infer-analyze(1), infer-capture(1), infer-compile(1),
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-diff(1), infer-events(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. (default: 0) See also infer-analyze(1), infer-capture(1), infer-compile(1),
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-diff(1), infer-events(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).
@ -595,7 +588,7 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. (default: auto) See also infer-analyze(1), infer-capture(1), infer-compile(1),
to pager otherwise. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-diff(1), infer-events(1), infer-explore(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).
@ -646,8 +639,7 @@ OPTIONS
qualifier | severity | line | column | procedure |
procedure_start_line | file | bug_trace | key | hash | line_offset |
qualifier_contains_potential_exception_note }
Fields to emit with --issues-tests (default: file procedure
line_offset bug_type bucket severity bug_trace) See also infer-report(1).
Fields to emit with --issues-tests See also infer-report(1).
--issues-tests file
Write a list of issues in a format suitable for tests to file
@ -662,8 +654,8 @@ OPTIONS
See also infer-capture(1).
--jobs,-j int
Run the specified number of analysis jobs simultaneously (default:
<number of cores>) See also infer-analyze(1).
Run the specified number of analysis jobs simultaneously
See also infer-analyze(1).
--keep-going
Activates: Keep going when the analysis encounters a failure
@ -728,7 +720,7 @@ OPTIONS
computing liveness. In other words, assignement to variables of
these types (or common wrappers around these types such as
unique_ptr<type>) will count as dead stores when the variables are
not read explicitly by the program. (default: []) See also infer-analyze(1).
not read explicitly by the program. See also infer-analyze(1).
--liveness-only
Activates: Enable --liveness and disable all other checkers
@ -769,7 +761,7 @@ OPTIONS
unknown_origin }
Specify the memory leak buckets to be checked in C++:
- cpp from C++ code
(default: cf)
See also infer-analyze(1).
--nullsafe
@ -862,11 +854,10 @@ OPTIONS
--progress-bar-style { auto | plain | multiline }
Style of the progress bar. auto selects multiline if connected to
a tty, otherwise plain. (default: auto) See also infer-analyze(1) and infer-capture(1).
a tty, otherwise plain. See also infer-analyze(1) and infer-capture(1).
--project-root,-C dir
Specify the root directory of the project (default: .)
See also infer-analyze(1), infer-capture(1), infer-report(1), and
Specify the root directory of the project See also infer-analyze(1), infer-capture(1), infer-report(1), and
infer-run(1).
--pulse
@ -890,22 +881,20 @@ OPTIONS
See also infer-analyze(1).
--quandary-endpoints json
Specify endpoint classes for Quandary (default: [])
See also infer-analyze(1).
Specify endpoint classes for Quandary See also infer-analyze(1).
--quandary-only
Activates: Enable --quandary and disable all other checkers
(Conversely: --no-quandary-only) See also infer-analyze(1).
--quandary-sanitizers json
Specify custom sanitizers for Quandary (default: [])
See also infer-analyze(1).
Specify custom sanitizers for Quandary See also infer-analyze(1).
--quandary-sinks json
Specify custom sinks for Quandary (default: []) See also infer-analyze(1).
Specify custom sinks for Quandary See also infer-analyze(1).
--quandary-sources json
Specify custom sources for Quandary (default: []) See also infer-analyze(1).
Specify custom sources for Quandary See also infer-analyze(1).
--quandaryBO
Activates: [EXPERIMENTAL] The quandaryBO tainted buffer access
@ -959,14 +948,12 @@ OPTIONS
See also infer-analyze(1) and infer-run(1).
--report-formatter { none | phabricator }
Which formatter to use when emitting the report (default:
phabricator) See also infer-report(1).
Which formatter to use when emitting the report See also infer-report(1).
--report-hook script
Specify a script to be executed after the analysis results are
written. This script will be passed, --issues-json, --issues-txt,
--issues-xml, --project-root, and --results-dir. (default: <infer
installation directory>/lib/python/report.py) See also infer-analyze(1) and infer-run(1).
--issues-xml, --project-root, and --results-dir. See also infer-analyze(1) and infer-run(1).
--report-previous path
Report of the base revision to use for comparison See also infer-reportdiff(1).
@ -975,8 +962,8 @@ OPTIONS
do not report a type of errors See also infer-report(1) and infer-run(1).
--results-dir,-o dir
Write results and internal files in the specified directory
(default: ./infer-out) See also infer-analyze(1), infer-capture(1), infer-explore(1),
Write results and internal files in the specified directory
See also infer-analyze(1), infer-capture(1), infer-explore(1),
infer-report(1), and infer-run(1).
--select N
@ -1057,8 +1044,8 @@ OPTIONS
(Conversely: --source-preview) See also infer-explore(1).
--sqlite-lock-timeout int
Timeout for SQLite results database operations, in milliseconds.
(default: five seconds times number of cores) See also infer-analyze(1), infer-capture(1), and infer-run(1).
Timeout for SQLite results database operations, in milliseconds.
See also infer-analyze(1), infer-capture(1), and infer-run(1).
--no-starvation
Deactivates: starvation analysis (Conversely: --starvation)
@ -1070,7 +1057,7 @@ OPTIONS
--threadsafe-aliases json
Specify custom annotations that should be considered aliases of
@ThreadSafe (default: []) See also infer-analyze(1).
@ThreadSafe See also infer-analyze(1).
--no-uninit
Deactivates: checker for use of uninitialized values (Conversely:

@ -96,9 +96,11 @@ type desc =
; short: string
; meta: string
; doc: string
; default_string: string
; spec: spec
; decode_json: inferconfig_dir:string -> Yojson.Basic.t -> string list
(** how to go from an option in the json config file to a list of command-line options *)
; decode_json: inferconfig_dir:string -> Yojson.Basic.t -> string list }
}
let dashdash ?short long =
match (long, short) with
@ -272,6 +274,7 @@ let deprecate_desc parse_mode ~long ~short ~deprecated doc desc =
; short= deprecated
; meta= ""
; doc= ""
; default_string= ""
; spec= deprecated_spec
; decode_json= deprecated_decode_json }
@ -286,15 +289,9 @@ let mk ?(deprecated = []) ?(parse_mode = InferCommand) ?(in_help = []) ~long ?sh
raise (Arg.Bad (F.sprintf "bad value %s for flag %s (%s)" str long (Exn.to_string exc)))
in
let spec = mk_spec setter in
let doc =
let default_string = default_to_string default in
if default_string = "" then doc
else
let doc_default_sep = if String.is_suffix ~suffix:"\n" doc then "" else " " in
doc ^ doc_default_sep ^ "(default: $(i," ^ Cmdliner.Manpage.escape default_string ^ "))"
in
let default_string = default_to_string default in
let short = match short0 with Some c -> String.of_char c | None -> "" in
let desc = {long; short; meta; doc; spec; decode_json} in
let desc = {long; short; meta; doc; default_string; spec; decode_json} in
(* add desc for long option, with documentation (which includes any short option) for exes *)
if long <> "" then add parse_mode in_help desc ;
(* add desc for short option only for parsing, without documentation *)
@ -790,7 +787,13 @@ let mk_rest_actions ?(parse_mode = InferCommand) ?(in_help = []) doc ~usage deco
select_parse_mode ~usage (decode_action arg) |> ignore )
in
add parse_mode in_help
{long= "--"; short= ""; meta= ""; doc; spec; decode_json= (fun ~inferconfig_dir:_ _ -> [])} ;
{ long= "--"
; short= ""
; meta= ""
; doc
; default_string= ""
; spec
; decode_json= (fun ~inferconfig_dir:_ _ -> []) } ;
rest
@ -1055,7 +1058,7 @@ let wrap_line indent_string wrap_length line0 =
List.rev (line :: rev_lines)
let show_manual ?internal_section format default_doc command_opt =
let show_manual ?(scrub_defaults = false) ?internal_section format default_doc command_opt =
let command_doc =
match command_opt with
| None ->
@ -1071,9 +1074,16 @@ let show_manual ?internal_section format default_doc command_opt =
match meta with "" -> () | meta -> F.fprintf f " $(i,%s)" (Cmdliner.Manpage.escape meta)
in
let pp_short f = function "" -> () | s -> Format.fprintf f ",$(b,-%s)" s in
let block_of_desc {long; meta; short; doc} =
let block_of_desc {long; meta; short; doc; default_string} =
if String.equal doc "" then []
else
let doc =
if scrub_defaults || default_string = "" then doc
else
let doc_default_sep = if String.is_suffix ~suffix:"\n" doc then "" else " " in
Printf.sprintf "%s%s(default: %s)" doc doc_default_sep
(Cmdliner.Manpage.escape default_string)
in
let doc_first_line, doc_other_lines =
match String.split ~on:'\n' doc with first :: other -> (first, other) | [] -> ("", [])
in

@ -247,13 +247,15 @@ val is_env_var_set : string -> bool
(** [is_env_var_set var] is true if $[var]=1 *)
val show_manual :
?internal_section:string
?scrub_defaults:bool
-> ?internal_section:string
-> Cmdliner.Manpage.format
-> command_doc
-> InferCommand.t option
-> unit
(** Display the manual of [command] to the user, or [command_doc] if [command] is None. [format] is
used as for [Cmdliner.Manpage.print]. If [internal_section] is specified, add a section titled
[internal_section] about internal (hidden) options. *)
used as for [Cmdliner.Manpage.print]. If [internal_section] is specified, add a section titled
[internal_section] about internal (hidden) options. If [scrub_defaults] then do not print default
values for options. *)
val keep_args_file : bool ref

@ -1504,6 +1504,10 @@ and help =
CLOpt.mk_set var `HelpFull ~long:"help-full"
~in_help:(List.map InferCommand.all_commands ~f:(fun command -> (command, manual_generic)))
(Printf.sprintf "Show this manual with all internal options in the %s section" manual_internal) ;
CLOpt.mk_set var `HelpScrubbed ~long:"help-scrubbed"
"Show this manual without specifying default values induced by the current build configuration" ;
CLOpt.mk_set var `HelpScrubbedFull ~long:"help-scrubbed-full"
"Show the scrubbed manual with all internal options" ;
var
@ -2528,6 +2532,11 @@ let post_parsing_initialization command_opt =
CLOpt.show_manual !help_format CommandDoc.infer command_opt
| `HelpFull ->
CLOpt.show_manual ~internal_section:manual_internal !help_format CommandDoc.infer command_opt
| `HelpScrubbed ->
CLOpt.show_manual ~scrub_defaults:true !help_format CommandDoc.infer command_opt
| `HelpScrubbedFull ->
CLOpt.show_manual ~scrub_defaults:true ~internal_section:manual_internal !help_format
CommandDoc.infer command_opt
| `None ->
() ) ;
if !version <> `None || !help <> `None then Pervasives.exit 0 ;

Loading…
Cancel
Save