Go Fmt¶
New in version 3.0.
The Go toolchain includes an automatic formatter, go fmt which all code is expected to be run through in order to maintain consistency throughout a codebase.
This tool will report if .go
files are incorrectly formatted,
suggesting to the user that they should reformat it.
Supported File Types¶
The following are supported by this tool:
Go:
*.go
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 Go Fmt in Review Board¶
You’ll need to add a Review Bot configuration in Review Board (see Tool Configurations).
There are no configuration options available for this tool.