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.

530 lines
15 KiB

<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Thu Jun 7 16:35:58 2018 -->
<!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 COMPILATION DATABASE OPTIONS">BUCK COMPILATION DATABASE OPTIONS</a><br>
<a href="#BUCK FLAVORS OPTIONS">BUCK FLAVORS OPTIONS</a><br>
<a href="#BUCK FOR JAVA OPTIONS">BUCK FOR JAVA 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</b> <i>[options]</i> <b>-- buck</b> <i>...</i>
<b><br>
infer capture --flavors</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>--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>--no-filtering</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. (default:
<i>0</i>)</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. (default:
<i>0</i>)</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. (default:
<i>0</i>)</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>analyze</i>, <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>python</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. (default:
<i>auto</i>)</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>--project-root</b>,<b>-C</b>
<i>dir</i></p>
<p style="margin-left:17%;">Specify the root directory of
the project (default: <i>/home/jul/infer.fb</i>)</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 (default:
<i>/home/jul/infer.fb/infer-out</i>)</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>
<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 COMPILATION DATABASE OPTIONS
<a name="BUCK COMPILATION DATABASE OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><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.</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>
<h2>BUCK FLAVORS OPTIONS
<a name="BUCK FLAVORS 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 analysis of files matched
by the specified regular expression</p>
<p style="margin-left:11%;"><b>--flavors</b></p>
<p style="margin-left:17%;">Activates: Buck integration
using Buck flavors (clang only), eg <i>&rsquo;infer
--flavors -- buck build //foo:bar#infer&rsquo;</i>
(Conversely: <b>--no-flavors</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>&rsquo;buck
build&rsquo;</i></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</p>
<h2>BUCK FOR JAVA OPTIONS
<a name="BUCK FOR JAVA OPTIONS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>--buck-out</b>
<i>dir</i></p>
<p style="margin-left:17%;">Specify the root directory of
buck-out</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. (default:
<i>0</i>)</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>--iphoneos-target-sdk-version</b>
<i>string</i></p>
<p style="margin-left:17%;">Specify the target SDK version
to use for iphoneos</p>
<p style="margin-left:11%;"><b>--iphoneos-target-sdk-version-path-regex</b>
<i>+string</i></p>
<p style="margin-left:17%;">To pass a specific target SDK
version to use for iphoneos in a particular path, with the
format path:version (can be specified multiple times)</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</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>--compute-analytics</b></p>
<p style="margin-left:17%;">Activates: Emit analytics as
info-level issues, like component kit line count and
component kit file cyclomatic complexity (Conversely:
<b>--no-compute-analytics</b>)</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>--cxx-infer-headers</b></p>
<p style="margin-left:17%;">Activates: Include C++ header
models during compilation. Infer swaps some C++ headers for
its own in order to get a better model of, eg, the standard
library. This can sometimes cause compilation failures.
(Conversely: <b>--no-cxx-infer-headers</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>--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>&rsquo;infer -- &lt;xcodebuild
command&gt;&rsquo;</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>--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>
<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>