Update GoTool for new tool support and better parsing.
Review Request #11570 — Created April 2, 2021 and submitted
This updates
GoTool
to subclass the newerBaseTool
, and to use the
newer features it offers (dependencies, improved file extension
handling, new mixin for full-repository support).It also fixes a number of issues that could arise with parsing the
output from bothgo test
andgo vet
. The original implementation
requested JSON payloads from both, butgo vet
's JSON payloads are not
guaranteed. Parser/compiler errors would result in standard errors, not
JSON payloads, causing our parsing to break.The new implementation just parses the standard error output,
simplifying the code considerably. That will catch both forms of resultsThe
go test
parsing has been improved as well. We no longer make
assumptions that all lines of code can be joined into a single JSON
array, instead parsing each line individually. We combine results
indicating failed test runs along with results showing test output into
a single representation, and build comments from that (helping
developers see why tests failed). We also provide general comments if
we fail to find any useful results but do find errors, showing the
output that occurred.
Unit tests pass on Python 2.7 and 3.x.
Summary | ID |
---|---|
b16cca788a5deb6c7a62d0a41d536f2386e831dc |
Description | From | Last Updated |
---|---|---|
E501 line too long (80 > 79 characters) |
reviewbot |