Gofmt Tool for Review Bot
Review Request #11265 — Created Nov. 4, 2020 and submitted
The tool is designed to be a lightweight solution capable of checking
whether a file is correctly formatted or not based ongo fmt
output.
Unfortunately, other go commands such asgo vet
are 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 fmt
is working correctly.
Description | From | Last Updated |
---|---|---|
This is the user-visible name, so let's use name = 'go fmt' |
david | |
This is short enough that we can fit it all on one line: gofmt_output = execute(['go', 'fmt', path]) |
david | |
If you add rich_text=True to this function call, it should format the go fmt as a code block. |
david | |
I don't think we need the empty line here? |
ceciliawei |
- Commit:
-
2188643908c2f3186296f3638106bb665b73c00d5d3c73453bcf3c2923ad3c67c54118e90887769b
- Added Files:
Checks run (2 succeeded)
- Change Summary:
-
Included try/except just in case the execute command fails. This change is based on feedback that Christian has given me on different Review Bot review requests
- Summary:
-
Gofmt Tool for ReviewBotGofmt Tool for Review Bot
- Commit:
-
5d3c73453bcf3c2923ad3c67c54118e90887769b8c90adf64a8f3487dd5ccea8fcac77b6e070e30e
- People:
-
Checks run (2 succeeded)
flake8 passed.JSHint passed.
- Change Summary:
-
Removed unnecessary blank line.
- Commit:
-
8c90adf64a8f3487dd5ccea8fcac77b6e070e30e543068ef25e8374aa1a9f2eee47a2e39f3cbfcb8