• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. Review Bot 4.x
    2. Version 4.x
    3. Version 3.0
    4. Version 2.0
    5. Version 1.0
    6. Module and Class Reference
    7. reviewbot.tools.fbinfer
  • Home
  • Installation
  • Manually Installing Review Bot
  • Review Bot Docker Images
  • Upgrading Review Bot
  • Configuring Review Bot
  • Review Bot Tools
  • Cargo Tool
  • Checkstyle
  • Clang Static Analyzer
  • Cppcheck
  • Cpplint
  • Doc8
  • FBInfer
  • Flake8
  • Go Fmt
  • Go Tool
  • JSHint
  • PMD
  • Pycodestyle
  • Pydocstyle
  • Pyflakes
  • RuboCop
  • Rust Fmt
  • Secret Scanner
  • ShellCheck
  • Module and Class Reference
  • reviewbot.tools.base
  • reviewbot.tools.base.mixins
  • reviewbot.tools.base.registry
  • reviewbot.tools.base.tool
  • reviewbot.testing.testcases
  • reviewbot.testing.utils
  • reviewbot.tools.testing
  • reviewbot.tools.testing.decorators
  • reviewbot.tools.testing.testcases
  • reviewbot.processing.review
  • reviewbot.utils.api
  • reviewbot.utils.filesystem
  • reviewbot.utils.log
  • reviewbot.utils.process
  • reviewbot.utils.text
  • reviewbot.celery
  • reviewbot.config
  • reviewbot.deprecation
  • reviewbot.errors
  • reviewbot.repositories
  • reviewbot.tasks
  • reviewbot.tools.cargotool
  • reviewbot.tools.checkstyle
  • reviewbot.tools.clang
  • reviewbot.tools.cppcheck
  • reviewbot.tools.cpplint
  • reviewbot.tools.doc8
  • reviewbot.tools.fbinfer
  • reviewbot.tools.flake8
  • reviewbot.tools.gofmt
  • reviewbot.tools.gotool
  • reviewbot.tools.jshint
  • reviewbot.tools.pmd
  • reviewbot.tools.pycodestyle
  • reviewbot.tools.pydocstyle
  • reviewbot.tools.pyflakes
  • reviewbot.tools.rbsecretscanner
  • reviewbot.tools.rubocop
  • reviewbot.tools.rustfmt
  • reviewbot.tools.shellcheck
  • General Index
  • Python Module Index
  • Release Notes
  • reviewbot.tools.fbinfer¶

    Review Bot tool to run FBInfer.

    Classes

    FBInferTool([settings])

    Review Bot tool to run FBInfer.

    class FBInferTool(settings=None, **kwargs)[source]¶

    Bases: FullRepositoryToolMixin, BaseTool

    Review Bot tool to run FBInfer.

    name = 'FBInfer'[source]¶

    The displayed name of the tool.

    Type:

    str

    version = '1.0'[source]¶

    The compatibility version of the tool.

    This should only be changed for major breaking updates. It will break compatibility with existing integration configurations, requiring manual updates to those configurations. Any existing configurations referencing the old version will not be run, unless an older version of the tool is being handled through another Review Bot worker providing the older tool.

    Type:

    str

    description = 'Checks code for errors using FBInfer, a tool for static Android, Java, C, C++, and iOS/Objective-C code analysis.'[source]¶

    A short description of the tool.

    Type:

    str

    timeout = 90[source]¶

    Timeout for tool execution, in seconds.

    Type:

    int

    exe_dependencies = ['infer'][source]¶

    A list of executable tools required by the tool.

    Each is the name of an executable on the filesystem, either in the PATH or defined in the exe_paths configuration.

    These will be checked when the worker starts. If a dependency for a tool is missing, the worker will not enable it.

    New in version 3.0: Tools that previously implemented check_dependencies() may want to be updated to use this.

    Type:

    dict

    options = [{'name': 'build_type', 'field_type': 'django.forms.ChoiceField', 'field_options': {'label': 'Build system', 'help_text': 'Choose how the project will be compiled.', 'choices': (('./gradlew', 'Android/Gradle with Wrapper (./gradlew)'), ('ant', 'Apache Ant (ant)'), ('buck build', 'Buck (buck build)'), ('clang -c', 'Clang (clang -c)'), ('cmake', 'CMake (cmake)'), ('gradle', 'Gradle (gradle)'), ('javac', 'Java (javac)'), ('make', 'Make (make)'), ('mvn', 'Maven (mvn)'), ('xcodebuild', 'XCode (xcodebuild)'))}}, {'name': 'build_target', 'field_type': 'django.forms.CharField', 'default': '', 'field_options': {'label': 'Build target', 'required': False, 'help_text': 'The name of the target to build, if the build system needs one or is capable of building multiple targets.'}}, {'name': 'xcode_configuration', 'field_type': 'django.forms.CharField', 'default': '', 'field_options': {'label': 'XCode configuration', 'required': False, 'help_text': 'Any additional configuration options needed for a XCode build (equivalent to the -configuration flag). This is ignored for non-XCode builds'}}, {'name': 'sdk', 'field_type': 'django.forms.CharField', 'default': '', 'field_options': {'label': 'XCode SDK', 'required': False, 'help_text': 'Include an XCode SDK required to build a project such as "iphonesimulator" for iOS. This is ignored for non-XCode builds.'}}][source]¶

    Configurable options defined for the tool.

    Each item in the list is a dictionary representing a form field to display in the Review Board administration UI. Keys include:

    field_type (str):

    The full path as a string to a Django form field class to render.

    name (str):

    The name/ID of the field. This will map to the key in the settings provided to handle_files() and handle_file().

    default (object, optional):

    The default value for the field.

    field_options (dict, optional):

    Additional options to pass to the form field’s constructor.

    widget (dict, optional):

    Information on the Django form field widget class used to render the field. This dictionary includes the following keys:

    type (str):

    The full path as a string to a Django form field widget class.

    attrs (dict, optional):

    A dictionary of attributes passed to the widget’s constructor.

    Type:

    list

    MULTI_FILE_BUILD_TYPES = {'./gradlew', 'ant', 'buck build', 'cmake', 'gradle', 'make', 'mvn', 'xcodebuild'}[source]¶
    build_base_command(**kwargs)[source]¶

    Build the base command line used to review files.

    Parameters:

    **kwargs (dict, unused) – Additional keyword arguments.

    Returns:

    The base command line.

    Return type:

    list of str

    handle_files(files, review, base_command, **kwargs)[source]¶

    Perform a review of all files.

    Parameters:
    • files (list of reviewbot.processing.review.File) – The files to process.

    • review (reviewbot.processing.review.Review) – The review being populated.

    • base_command (list of str) – The base command used to run infer.

    • **kwargs (dict) – Additional keyword arguments.

    handle_file(f, path, review, base_command, report, **kwargs)[source]¶

    Perform a review of a single file.

    If this is part of a multi-file build, the results for this file from that build will be reported. If not a multi-file build, then infer will be run on this file before reporting results.

    Parameters:
    • f (reviewbot.processing.review.File) – The file to process.

    • path (str) – The local path to the patched file to review.

    • review (reviewbot.processing.review.Review) – The review being populated.

    • base_command (list of str) – The base command used to run infer.

    • report (list of dict) – The report to append to.

    • **kwargs (dict, unused) – Additional keyword arguments.

    __annotations__ = {}¶

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube

    Copyright © 2006-2025 Beanbag, Inc. All rights reserved.

    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • FBInferTool
      • FBInferTool.name
      • FBInferTool.version
      • FBInferTool.description
      • FBInferTool.timeout
      • FBInferTool.exe_dependencies
      • FBInferTool.options
      • FBInferTool.MULTI_FILE_BUILD_TYPES
      • FBInferTool.build_base_command()
      • FBInferTool.handle_files()
      • FBInferTool.handle_file()
      • FBInferTool.__annotations__