Jump to >

Review Bot Documentation

Welcome to Review Bot!

Review Bot automates parts of the code review process, using a wide range of industry-standard code checking tools to look over your code and catch problems so your developers can focus on the bigger picture.

It is:

  • Made for Review Board: Tools are configured through Review Board’s existing Integrations functionality, letting you choose exactly when and how tools are run within your organization.

  • Scalable: Review Bot is built using Celery and can scale out to service very large Review Board deployments.

  • Extensible: Writing plugins is simple using a convenient API to retrieve code files and craft a review. If more power is needed, tools can access the full Review Board API.

Premium support for Review Bot is included with any Review Board support contract.

Getting Started

Review Bot 3.1 supports Review Board 3.0 or 4.0, and Python 2.7 or 3.6 through 3.10.

A Review Bot setup consists of three pieces:

  1. The Review Bot extension for Review Board.

  2. A message broker (such as RabbitMQ).

  3. At least one Review Bot worker (either on the Review Board server or somewhere else in your network), which will run the code checking tools.

There are two official ways to install Review Bot:

Once Review Bot is installed, you’ll need to configure the extension and the workers:

Ready to upgrade to a new version of Review Bot?

This will guide you through any installation and configuration changes you need to make.

Available Tools

The following tools are supported by Review Bot:

C/C++

  • Clang Static Analyzer - Compiles and checks C/C++/Objective-C code for a variety of problems

  • Cppcheck - Checks C/C++ code for undefined behavior and dangerous coding constructs

  • CppLint - Checks C++ code against Google’s style guide

Go

  • gofmt - Checks Go code for code formatting issues

  • Go Tool - Checks Go code using go vet and go test

Java

  • checkstyle - Checks Java code for code formatting issues and code standard inconsistencies

JavaScript

  • JSHint - Checks JavaScript code for common errors

Python

  • doc8 - Check ReStructuredText documentation for styling and syntax errors

  • flake8 - Checks Python code using a variety of common code Python quality tools

  • pycodestyle - Checks Python code for code formatting issues

  • pydocstyle - Checks Python docstrings for errors and common formatting issues

  • pyflakes - Checks Python code for missing imports, unused or undefined variables or functions, and more

Ruby

  • RuboCop - Checks Ruby code for common code formatting issues

Rust

  • Cargo Tool - Checks Rust code for errors and suspicious constructs

  • rustfmt - Checks Rust code for code formatting issues based on the automatic formatting rules in rustfmt

Shell Scripts

  • ShellCheck - Checks Bash/sh scripts for common problems and misused commands

Multi-Language Tools

  • FBInfer - Checks a wide range of programming languages for potential errors

  • PMD - Checks code in a variety of programming languages for syntax errors and other problems

  • Review Bot Secret Scanner - Checks source code and configuration files for accidental inclusion of sensitive keys and credentials

Extending Review Bot

Review Bot can be extended through custom tools. To do this, you’ll need to create a reviewbot.tools.base.tool.BaseTool subclass, registered through the reviewbot.tools Python entrypoint in a Python package.

Unit tests can be built using the reviewbot.tools.testing module.

See the module and class reference for details.