Gofmt Tool for ReviewBot
Review Request #11265 — Created Nov. 5, 2020 and updated
The tool is designed to be a lightweight solution capable of checking
whether a file is correctly formatted or not based on
Unfortunately, other go commands such as
go vetare better suited to
inherit from the RepositoryTool, as they require the ability to check
entire packages to properly test and vet files.
Manual testing was done to confirm that
go fmtis working correctly.
This is the user-visible name, so let's use name = 'go fmt'
This is short enough that we can fit it all on one line: gofmt_output = execute(['go', 'fmt', path])
If you add rich_text=True to this function call, it should format the go fmt as a code block.