Jump to >

Go Tool

New in version 3.0.

The Go tool allows you to use the code quality and testing tools built in to the Go toolchain. If configured, this will call out to go vet to inspect your code and go test to run unit tests.

Installation

This tool requires that Go is installed on the system running the Review Bot worker. Go is available for download on Linux/Mac/Windows.

See the official documentation on installing Go.

Configuration

Go Location

If the go command is in a non-standard location, and can’t be found in Review Bot’s PATH environment variable, then you’ll need to specify the path in the Review Bot worker config file:

exe_paths = {
    'go': '/path/to/go',
}

You will need to restart the Review Bot worker after making this change.

Enabling Full Repository Access

This tool requires full repository access, which is available for Git and Mercurial repositories. Each repository you intend to use must be configured in the Review Bot worker config file.

See Full Repository Access for instructions.

Enabling Go Tool in Review Board

First, you’ll need to add a Review Bot configuration in Review Board (see Tool Configurations).

The following configuration options are available:

Run tests:

Enable this checkbox to run your test suite using go test.

Vet code:

Enable this checkbox to perform checks on uploaded Go code using go vet.