infer-capture - capture source files for later analysis
infer
capture --buck-java [options] -- buck
...
infer capture --buck-clang [options] --
buck ...
infer capture --buck-compilation-database [no-]deps
[options] -- buck ...
infer capture [options]
--compilation-database file
infer capture [options]
--compilation-database-escaped file
infer capture [options] --
gradle/gradlew ...
infer capture [options] -- javac
...
infer capture [options] --
make/clang/gcc ...
infer capture [options] -- mvn/mvnw
...
infer capture [options] -- ndk-build
...
infer capture [--no-xcpretty] [options] --
xcodebuild ...
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.
--continue
Activates: Continue the capture for the reactive analysis, increasing the changed files/procedures. (If a procedure was changed beforehand, keep the changed marking.) (Conversely: --no-continue)
--debug,-g
Activates: Debug mode (also sets --debug-level 2, --developer-mode, --print-buckets, --print-types, --reports-include-ml-loc, --no-only-cheap-debug, --trace-error, --write-dotty, --write-html) (Conversely: --no-debug | -G)
--debug-level level
Debug level (sets --bo-debug level, --debug-level-analysis level, --debug-level-capture level, --debug-level-linters level):
- 0: only basic debugging
enabled
- 1: verbose debugging enabled
- 2: very verbose debugging enabled
--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted values.
--debug-level-capture int
Debug level for the capture. See --debug-level for accepted values.
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted values.
--force-delete-results-dir
Activates: Do not refuse to delete the results directory if it doesn't look like an infer results directory. (Conversely: --no-force-delete-results-dir)
--force-integration command
Proceed as if the first argument after -- was command. Possible values: ant, buck, gradle, gradlew, java, javac, cc, clang, gcc, clang++, c++, g++, make, configure, cmake, waf, mvn, mvnw, ndk-build, xcodebuild.
--help
Show this manual
--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.
--help-full
Show this manual with all internal options in the INTERNAL OPTIONS section
--load-average,-l float
Do not start new parallel jobs if the load average is greater than that specified (Buck and make only)
--print-logs
Activates: Also log messages to stdout and stderr (Conversely: --no-print-logs)
--progress-bar-style { auto | plain | multiline }
Style of the progress bar. auto selects multiline if connected to a tty, otherwise plain.
--project-root,-C dir
Specify the root directory of the project
--results-dir,-o dir
Write results and internal files in the specified directory
--skip-analysis-in-path +path_prefix_OCaml_regex
Ignore files whose path matches the given prefix (can be specified multiple times)
--sqlite-cache-size int
SQLite cache size in pages (if positive) or kB (if negative), follows formal of corresponding SQLite PRAGMA.
--sqlite-lock-timeout int
Timeout for SQLite results database operations, in milliseconds.
--sqlite-page-size int
SQLite page size in bytes, must be a power of two between 512 and 65536.
--workspace path
Specifies the root of the workspace, which is a directory containing --project-root. This can be needed if the capture phase is expected to require several different project roots, all relative to a common workspace. Usually a single project root is enough, though.
-- |
Stop argument processing, use remaining arguments as a build command |
--append-buck-flavors +string
Additional Buck flavors to append to targets discovered by the --buck-compilation-database option.
--buck-blacklist +regex
Skip capture of files matched by the specified regular expression. Only the clang, non-compilation-database
Buck integration is supported,
not Java.
--buck-clang
Activates: Buck integration for clang-based targets (C/C++/Objective-C/Objective-C++). (Conversely: --no-buck-clang)
--buck-combined
Activates: Buck integration for clang-based and Java targets. (Conversely: --no-buck-combined)
--buck-compilation-database { no-deps | deps }
Buck integration using the compilation database, with or without dependencies. Only includes clang targets, as per Buck's #compilation-database flavor.
--buck-compilation-database-depth int
Depth of dependencies used by the --buck-compilation-database deps option. By default, all recursive dependencies are captured.
--buck-java
Activates: Buck integration for Java targets. (Conversely: --no-buck-java)
--buck-java-flavor
Activates: Buck integration for Java which uses the buck flavor #infer-java-capture instead of genrules like buck-java. (Conversely: --no-buck-java-flavor)
--buck-java-flavor-suppress-config
Activates: Suppress setting buck config values for the infer binary and its version in the buck-java-flavor integration. (Conversely: --no-buck-java-flavor-suppress-config)
--buck-merge-all-deps
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 --buck-clang. (Conversely: --no-buck-merge-all-deps)
--buck-targets-blacklist +regex
Skip capture of buck targets matched by the specified regular expression. Only valid for --buck-compilation-database.
--Xbuck +string
Pass values as command-line arguments to invocations of ‘buck build‘. Only valid for --buck-clang.
--Xbuck-no-inline +string
Pass values as command-line arguments to invocations of ‘buck build‘, don't inline any args starting with '@'. Only valid for --buck-clang.
--xcode-developer-dir XCODE_DEVELOPER_DIR
Specify the path to Xcode developer directory, to use for Buck clang targets
--debug-level-linters int
Debug level for the linters. See --debug-level for accepted values.
--no-default-linters
Deactivates: Use the default linters for the analysis. (Conversely: --default-linters)
--linter string
From the linters available, only run this one linter. (Useful together with --linters-developer-mode)
--linters-def-file +file
Specify the file containing linters definition (e.g. 'linters.al')
--linters-def-folder +dir
Specify the folder containing linters files with extension .al
--linters-developer-mode
Activates: Debug mode for developing new linters. (Sets the analyzer to linters; also sets --debug, --debug-level-linters 2, --developer-mode, and unsets --allowed-failures and --default-linters. (Conversely: --no-linters-developer-mode)
--linters-doc-url +string
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.
--linters-ignore-clang-failures
Activates: Continue linting files even if some compilation fails. (Conversely: --no-linters-ignore-clang-failures)
--linters-validate-syntax-only
Activates: Validate syntax of AL files, then emit possible errors in JSON format to stdout (Conversely: --no-linters-validate-syntax-only)
--clang-biniou-file file
Specify a file containing the AST of the program, in biniou format. Please note you still need to provide a compilation command.
--clang-blacklisted-flags +string
Clang flags to filter out
--clang-blacklisted-flags-with-arg +string
Clang flags (taking args) to filter out
--clang-compound-literal-init-limit int
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.
--clang-yojson-file file
Specify a file containing the AST of the program, in yojson format. Please note you still need to provide a compilation command.
--compilation-database +path
File that contain compilation commands (can be specified multiple times)
--compilation-database-escaped +path
File that contain compilation commands where all entries are escaped for the shell, eg coming from Xcode (can be specified multiple times)
--no-cxx
Deactivates: Analyze C++ methods (Conversely: --cxx)
--dump-duplicate-symbols
Activates: Dump all symbols with the same name that are defined in more than one file. (Conversely: --no-dump-duplicate-symbols)
--frontend-tests
Activates: Save filename.ext.test.dot with the cfg in dotty format for frontend tests (also sets --print-types) (Conversely: --no-frontend-tests)
--headers
Activates: Analyze code in header files (Conversely: --no-headers)
--skip-translation-headers +path_prefix
Ignore headers whose path matches the given prefix
--Xclang +string
Pass values as command-line arguments to invocations of clang
--xcpretty
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 ‘infer -- <xcodebuild command>‘. (Conversely: --no-xcpretty)
--bootclasspath string
Specify the Java bootclasspath
--capture-blacklist regex
Skip capture of files matched by the specified OCaml regular expression (only supported by the javac integration for now).
--dependencies
Activates: Translate all the dependencies during the capture. The classes in the given jar file will be translated. No sources needed. (Conversely: --no-dependencies)
--generated-classes path
Specify where to load the generated class files
--java-jar-compiler path
Specify the Java compiler jar used to generate the bytecode
--java-version int
The version of Java being used. Set it to your Java version if mvn is failing.
INFER_ARGS, INFERCONFIG, INFER_STRICT_MODE
See the ENVIRONMENT section in the manual of infer(1).
.inferconfig
See the FILES section in the manual of infer(1).
infer-analyze(1), infer-compile(1), infer-run(1)