You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

622 lines
18 KiB

<!-- Creator : groff version 1.22.4 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>infer-capture</title>
</head>
<body>
<h1 align="center">infer-capture</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#BUCK OPTIONS">BUCK OPTIONS</a><br>
<a href="#CLANG LINTERS OPTIONS">CLANG LINTERS OPTIONS</a><br>
<a href="#CLANG OPTIONS">CLANG OPTIONS</a><br>
<a href="#JAVA OPTIONS">JAVA OPTIONS</a><br>
<a href="#ENVIRONMENT">ENVIRONMENT</a><br>
<a href="#FILES">FILES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">infer-capture -
capture source files for later analysis</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>infer
capture --buck-java</b> <i>[options]</i> <b>-- buck</b>
<i>...</i> <b><br>
infer capture --buck-clang</b> <i>[options]</i> <b>--
buck</b> <i>...</i> <b><br>
infer capture --buck-compilation-database</b> <i>[no-]deps
[options]</i> <b>-- buck</b> <i>...</i> <b><br>
infer capture</b> <i>[options]</i>
<b>--compilation-database</b> <i>file</i> <b><br>
infer capture</b> <i>[options]</i>
<b>--compilation-database-escaped</b> <i>file</i> <b><br>
infer capture</b> <i>[options]</i> <b>--
gradle</b>/<b>gradlew</b> <i>...</i> <b><br>
infer capture</b> <i>[options]</i> <b>-- javac</b>
<i>...</i> <b><br>
infer capture</b> <i>[options]</i> <b>--
make</b>/<b>clang</b>/<b>gcc</b> <i>...</i> <b><br>
infer capture</b> <i>[options]</i> <b>-- mvn</b>/<b>mvnw</b>
<i>...</i> <b><br>
infer capture</b> <i>[options]</i> <b>-- ndk-build</b>
<i>...</i> <b><br>
infer capture</b> <i>[--no-xcpretty] [options]</i> <b>--
xcodebuild</b> <i>...</i></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Capture the
build command or compilation database specified on the
command line: infer intercepts calls to the compiler to read
source files, translate them into infer's intermediate
representation, and store the result of the translation in
the results directory.</p>
<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>--continue</b></p>
<p style="margin-left:17%;">Activates: Continue the capture
for the reactive analysis, increasing the changed
files/procedures. (If a procedure was changed beforehand,
keep the changed marking.) (Conversely:
<b>--no-continue</b>)</p>
<p style="margin-left:11%;"><b>--debug</b>,<b>-g</b></p>
<p style="margin-left:17%;">Activates: Debug mode (also
sets <b>--debug-level 2</b>, <b>--developer-mode</b>,
<b>--print-buckets</b>, <b>--print-types</b>,
<b>--reports-include-ml-loc</b>,
<b>--no-only-cheap-debug</b>, <b>--trace-error</b>,
<b>--write-dotty</b>, <b>--write-html</b>) (Conversely:
<b>--no-debug</b> | <b>-G</b>)</p>
<p style="margin-left:11%;"><b>--debug-level</b>
<i>level</i></p>
<p style="margin-left:17%;">Debug level (sets
<b>--bo-debug</b> <i>level</i>,
<b>--debug-level-analysis</b> <i>level</i>,
<b>--debug-level-capture</b> <i>level</i>,
<b>--debug-level-linters</b> <i>level</i>):</p>
<p style="margin-left:11%;">- 0: only basic debugging
enabled <br>
- 1: verbose debugging enabled <br>
- 2: very verbose debugging enabled <b><br>
--debug-level-analysis</b> <i>int</i></p>
<p style="margin-left:17%;">Debug level for the analysis.
See <b>--debug-level</b> for accepted values.</p>
<p style="margin-left:11%;"><b>--debug-level-capture</b>
<i>int</i></p>
<p style="margin-left:17%;">Debug level for the capture.
See <b>--debug-level</b> for accepted values.</p>
<p style="margin-left:11%;"><b>--debug-level-linters</b>
<i>int</i></p>
<p style="margin-left:17%;">Debug level for the linters.
See <b>--debug-level</b> for accepted values.</p>
<p style="margin-left:11%;"><b>--force-delete-results-dir</b></p>
<p style="margin-left:17%;">Activates: Do not refuse to
delete the results directory if it doesn't look like an
infer results directory. (Conversely:
<b>--no-force-delete-results-dir</b>)</p>
<p style="margin-left:11%;"><b>--force-integration</b>
<i>command</i></p>
<p style="margin-left:17%;">Proceed as if the first
argument after <b>--</b> was <i>command</i>. Possible
values: <i>ant</i>, <i>buck</i>, <i>gradle</i>,
<i>gradlew</i>, <i>java</i>, <i>javac</i>, <i>cc</i>,
<i>clang</i>, <i>gcc</i>, <i>clang++</i>, <i>c++</i>,
<i>g++</i>, <i>make</i>, <i>configure</i>, <i>cmake</i>,
<i>waf</i>, <i>mvn</i>, <i>mvnw</i>, <i>ndk-build</i>,
<i>xcodebuild</i>.</p>
<p style="margin-left:11%;"><b>--help</b></p>
<p style="margin-left:17%;">Show this manual</p>
<p style="margin-left:11%;"><b>--help-format</b> <i>{ auto
| groff | pager | plain }</i></p>
<p style="margin-left:17%;">Show this help in the specified
format. <b>auto</b> sets the format to <b>plain</b> if the
environment variable <b>TERM</b> is &quot;dumb&quot; or
undefined, and to <b>pager</b> otherwise.</p>
<p style="margin-left:11%;"><b>--help-full</b></p>
<p style="margin-left:17%;">Show this manual with all
internal options in the INTERNAL OPTIONS section</p>
<p style="margin-left:11%;"><b>--load-average</b>,<b>-l</b>
<i>float</i></p>
<p style="margin-left:17%;">Do not start new parallel jobs
if the load average is greater than that specified (Buck and
make only)</p>
<p style="margin-left:11%;"><b>--print-logs</b></p>
<p style="margin-left:17%;">Activates: Also log messages to
stdout and stderr (Conversely: <b>--no-print-logs</b>)</p>
<p style="margin-left:11%;"><b>--progress-bar-style</b>
<i>{ auto | plain | multiline }</i></p>
<p style="margin-left:17%;">Style of the progress bar.
<b>auto</b> selects <b>multiline</b> if connected to a tty,
otherwise <b>plain</b>.</p>
<p style="margin-left:11%;"><b>--project-root</b>,<b>-C</b>
<i>dir</i></p>
<p style="margin-left:17%;">Specify the root directory of
the project</p>
<p style="margin-left:11%;"><b>--results-dir</b>,<b>-o</b>
<i>dir</i></p>
<p style="margin-left:17%;">Write results and internal
files in the specified directory</p>
<p style="margin-left:11%;"><b>--skip-analysis-in-path</b>
<i>+path_prefix_OCaml_regex</i></p>
<p style="margin-left:17%;">Ignore files whose path matches
the given prefix (can be specified multiple times)</p>
<p style="margin-left:11%;"><b>--sqlite-cache-size</b>
<i>int</i></p>
<p style="margin-left:17%;">SQLite cache size in pages (if
positive) or kB (if negative), follows formal of
corresponding SQLite PRAGMA.</p>
<p style="margin-left:11%;"><b>--sqlite-lock-timeout</b>
<i>int</i></p>
<p style="margin-left:17%;">Timeout for SQLite results
database operations, in milliseconds.</p>
<p style="margin-left:11%;"><b>--sqlite-page-size</b>
<i>int</i></p>
<p style="margin-left:17%;">SQLite page size in bytes, must
be a power of two between 512 and 65536.</p>
<p style="margin-left:11%;"><b>--workspace</b>
<i>path</i></p>
<p style="margin-left:17%;">Specifies the root of the
workspace, which is a directory containing
<b>--project-root</b>. This can be needed if the capture
phase is expected to require several <i>different</i>
project roots, all relative to a common workspace. Usually a
single project root is enough, though.</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>--</b></p></td>
<td width="3%"></td>
<td width="83%">
<p>Stop argument processing, use remaining arguments as a
build command</p></td></tr>
</table>
<h2>BUCK OPTIONS
<a name="BUCK OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>--append-buck-flavors</b>
<i>+string</i></p>
<p style="margin-left:17%;">Additional Buck flavors to
append to targets discovered by the
<b>--buck-compilation-database</b> option.</p>
<p style="margin-left:11%;"><b>--buck-blacklist</b>
<i>+regex</i></p>
<p style="margin-left:17%;">Skip capture of files matched
by the specified regular expression. Only the clang,
non-compilation-database</p>
<p style="margin-left:11%;">Buck integration is supported,
not Java. <b><br>
--buck-clang</b></p>
<p style="margin-left:17%;">Activates: Buck integration for
clang-based targets (C/C++/Objective-C/Objective-C++).
(Conversely: <b>--no-buck-clang</b>)</p>
<p style="margin-left:11%;"><b>--buck-combined</b></p>
<p style="margin-left:17%;">Activates: Buck integration for
clang-based and Java targets. (Conversely:
<b>--no-buck-combined</b>)</p>
<p style="margin-left:11%;"><b>--buck-compilation-database</b>
<i>{ no-deps | deps }</i></p>
<p style="margin-left:17%;">Buck integration using the
compilation database, with or without dependencies. Only
includes clang targets, as per Buck's
<i>#compilation-database</i> flavor.</p>
<p style="margin-left:11%;"><b>--buck-compilation-database-depth</b>
<i>int</i></p>
<p style="margin-left:17%;">Depth of dependencies used by
the <b>--buck-compilation-database deps</b> option. By
default, all recursive dependencies are captured.</p>
<p style="margin-left:11%;"><b>--buck-java</b></p>
<p style="margin-left:17%;">Activates: Buck integration for
Java targets. (Conversely: <b>--no-buck-java</b>)</p>
<p style="margin-left:11%;"><b>--buck-java-flavor</b></p>
<p style="margin-left:17%;">Activates: Buck integration for
Java which uses the buck flavor #infer-java-capture instead
of genrules like buck-java. (Conversely:
<b>--no-buck-java-flavor</b>)</p>
<p style="margin-left:11%;"><b>--buck-java-flavor-suppress-config</b></p>
<p style="margin-left:17%;">Activates: Suppress setting
buck config values for the infer binary and its version in
the buck-java-flavor integration. (Conversely:
<b>--no-buck-java-flavor-suppress-config</b>)</p>
<p style="margin-left:11%;"><b>--buck-merge-all-deps</b></p>
<p style="margin-left:17%;">Activates: Find and merge all
infer dependencies produced by buck. Use this flag if infer
doesn't find any files to analyze after a successful
capture. Only valid for <b>--buck-clang</b>. (Conversely:
<b>--no-buck-merge-all-deps</b>)</p>
<p style="margin-left:11%;"><b>--buck-targets-blacklist</b>
<i>+regex</i></p>
<p style="margin-left:17%;">Skip capture of buck targets
matched by the specified regular expression. Only valid for
<b>--buck-compilation-database</b>.</p>
<p style="margin-left:11%;"><b>--Xbuck</b>
<i>+string</i></p>
<p style="margin-left:17%;">Pass values as command-line
arguments to invocations of <i>&lsquo;buck build&lsquo;</i>.
Only valid for <b>--buck-clang</b>.</p>
<p style="margin-left:11%;"><b>--Xbuck-no-inline</b>
<i>+string</i></p>
<p style="margin-left:17%;">Pass values as command-line
arguments to invocations of <i>&lsquo;buck build&lsquo;</i>,
don't inline any args starting with '@'. Only valid for
<b>--buck-clang</b>.</p>
<p style="margin-left:11%;"><b>--xcode-developer-dir</b>
<i>XCODE_DEVELOPER_DIR</i></p>
<p style="margin-left:17%;">Specify the path to Xcode
developer directory, to use for Buck clang targets</p>
<h2>CLANG LINTERS OPTIONS
<a name="CLANG LINTERS OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>--debug-level-linters</b>
<i>int</i></p>
<p style="margin-left:17%;">Debug level for the linters.
See <b>--debug-level</b> for accepted values.</p>
<p style="margin-left:11%;"><b>--no-default-linters</b></p>
<p style="margin-left:17%;">Deactivates: Use the default
linters for the analysis. (Conversely:
<b>--default-linters</b>)</p>
<p style="margin-left:11%;"><b>--linter</b>
<i>string</i></p>
<p style="margin-left:17%;">From the linters available,
only run this one linter. (Useful together with
<b>--linters-developer-mode</b>)</p>
<p style="margin-left:11%;"><b>--linters-def-file</b>
<i>+file</i></p>
<p style="margin-left:17%;">Specify the file containing
linters definition (e.g. 'linters.al')</p>
<p style="margin-left:11%;"><b>--linters-def-folder</b>
<i>+dir</i></p>
<p style="margin-left:17%;">Specify the folder containing
linters files with extension .al</p>
<p style="margin-left:11%;"><b>--linters-developer-mode</b></p>
<p style="margin-left:17%;">Activates: Debug mode for
developing new linters. (Sets the analyzer to
<b>linters</b>; also sets <b>--debug</b>,
<b>--debug-level-linters 2</b>, <b>--developer-mode</b>, and
unsets <b>--allowed-failures</b> and
<b>--default-linters</b>. (Conversely:
<b>--no-linters-developer-mode</b>)</p>
<p style="margin-left:11%;"><b>--linters-doc-url</b>
<i>+string</i></p>
<p style="margin-left:17%;">Specify custom documentation
URL for some linter that overrides the default one. Useful
if your project has specific ways of fixing a lint error
that is not true in general or public info. Format:
linter_name:doc_url.</p>
<p style="margin-left:11%;"><b>--linters-ignore-clang-failures</b></p>
<p style="margin-left:17%;">Activates: Continue linting
files even if some compilation fails. (Conversely:
<b>--no-linters-ignore-clang-failures</b>)</p>
<p style="margin-left:11%;"><b>--linters-validate-syntax-only</b></p>
<p style="margin-left:17%;">Activates: Validate syntax of
AL files, then emit possible errors in JSON format to stdout
(Conversely: <b>--no-linters-validate-syntax-only</b>)</p>
<h2>CLANG OPTIONS
<a name="CLANG OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>--clang-biniou-file</b>
<i>file</i></p>
<p style="margin-left:17%;">Specify a file containing the
AST of the program, in biniou format. Please note you still
need to provide a compilation command.</p>
<p style="margin-left:11%;"><b>--clang-blacklisted-flags</b>
<i>+string</i></p>
<p style="margin-left:17%;">Clang flags to filter out</p>
<p style="margin-left:11%;"><b>--clang-blacklisted-flags-with-arg</b>
<i>+string</i></p>
<p style="margin-left:17%;">Clang flags (taking args) to
filter out</p>
<p style="margin-left:11%;"><b>--clang-compound-literal-init-limit</b>
<i>int</i></p>
<p style="margin-left:17%;">Limit after which
initialization of compound types (structs and arrays) is not
done element by element but using a builtin function that
each analysis has to model.</p>
<p style="margin-left:11%;"><b>--clang-yojson-file</b>
<i>file</i></p>
<p style="margin-left:17%;">Specify a file containing the
AST of the program, in yojson format. Please note you still
need to provide a compilation command.</p>
<p style="margin-left:11%;"><b>--compilation-database</b>
<i>+path</i></p>
<p style="margin-left:17%;">File that contain compilation
commands (can be specified multiple times)</p>
<p style="margin-left:11%;"><b>--compilation-database-escaped</b>
<i>+path</i></p>
<p style="margin-left:17%;">File that contain compilation
commands where all entries are escaped for the shell, eg
coming from Xcode (can be specified multiple times)</p>
<p style="margin-left:11%;"><b>--no-cxx</b></p>
<p style="margin-left:17%;">Deactivates: Analyze C++
methods (Conversely: <b>--cxx</b>)</p>
<p style="margin-left:11%;"><b>--dump-duplicate-symbols</b></p>
<p style="margin-left:17%;">Activates: Dump all symbols
with the same name that are defined in more than one file.
(Conversely: <b>--no-dump-duplicate-symbols</b>)</p>
<p style="margin-left:11%;"><b>--frontend-tests</b></p>
<p style="margin-left:17%;">Activates: Save
filename.ext.test.dot with the cfg in dotty format for
frontend tests (also sets <b>--print-types</b>) (Conversely:
<b>--no-frontend-tests</b>)</p>
<p style="margin-left:11%;"><b>--headers</b></p>
<p style="margin-left:17%;">Activates: Analyze code in
header files (Conversely: <b>--no-headers</b>)</p>
<p style="margin-left:11%;"><b>--skip-translation-headers</b>
<i>+path_prefix</i></p>
<p style="margin-left:17%;">Ignore headers whose path
matches the given prefix</p>
<p style="margin-left:11%;"><b>--Xclang</b>
<i>+string</i></p>
<p style="margin-left:17%;">Pass values as command-line
arguments to invocations of clang</p>
<p style="margin-left:11%;"><b>--xcpretty</b></p>
<p style="margin-left:17%;">Activates: Infer will use
xcpretty together with xcodebuild to analyze an iOS app.
xcpretty just needs to be in the path, infer command is
still just <i>&lsquo;infer -- &lt;xcodebuild
command&gt;&lsquo;</i>. (Conversely:
<b>--no-xcpretty</b>)</p>
<h2>JAVA OPTIONS
<a name="JAVA OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>--bootclasspath</b>
<i>string</i></p>
<p style="margin-left:17%;">Specify the Java
bootclasspath</p>
<p style="margin-left:11%;"><b>--capture-blacklist</b>
<i>regex</i></p>
<p style="margin-left:17%;">Skip capture of files matched
by the specified OCaml regular expression (only supported by
the javac integration for now).</p>
<p style="margin-left:11%;"><b>--dependencies</b></p>
<p style="margin-left:17%;">Activates: Translate all the
dependencies during the capture. The classes in the given
jar file will be translated. No sources needed. (Conversely:
<b>--no-dependencies</b>)</p>
<p style="margin-left:11%;"><b>--generated-classes</b>
<i>path</i></p>
<p style="margin-left:17%;">Specify where to load the
generated class files</p>
<p style="margin-left:11%;"><b>--java-jar-compiler</b>
<i>path</i></p>
<p style="margin-left:17%;">Specify the Java compiler jar
used to generate the bytecode</p>
<p style="margin-left:11%;"><b>--java-version</b>
<i>int</i></p>
<p style="margin-left:17%;">The version of Java being used.
Set it to your Java version if mvn is failing.</p>
<h2>ENVIRONMENT
<a name="ENVIRONMENT"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>INFER_ARGS</b>,
<b>INFERCONFIG</b>, <b>INFER_STRICT_MODE</b></p>
<p style="margin-left:17%;">See the ENVIRONMENT section in
the manual of <b>infer</b>(1).</p>
<h2>FILES
<a name="FILES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>.inferconfig</b></p>
<p style="margin-left:17%;">See the FILES section in the
manual of <b>infer</b>(1).</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>infer-analyze</b>(1),
<b>infer-compile</b>(1), <b>infer-run</b>(1)</p>
<hr>
</body>
</html>