bradleyfalzon / gopherci

GopherCI was a project to help you maintain high-quality Go projects, by checking each GitHub Pull Request, for backward incompatible changes, and a suite of other third party static analysis tools.
https://gopherci.io
BSD 2-Clause "Simplified" License
102 stars 13 forks source link

Analysis page to show output #109

Closed bradleyfalzon closed 7 years ago

bradleyfalzon commented 7 years ago

Analysis to accept an Executer instead of creating its own

Previously I was trying to keep as much logic out of the GitHub
specific handler as I could that wasn't directly GitHub related.
So the analyser creating its own execution environment was OK
initially. But it's added some knowledge the Analyser doesn't
require, and eventually the analyser will be refactored more into
its own parts the the Analyse method may just run a single tool
and a constructor will prepare the environment for the tools.

Also, we'll soon be wanting to wrap/decorate the Executer to have
the database log the output of all the commands being issued.

So the GitHub handler, that already knew about the analyser keeps
that knowledge to itself and just passes a working executor and
manages the clean up itself.

db.DB to provide an analysis.Executer for recording executions

DB must now implement a mechanism to record (or discard) results
of an Execution. This is because the user operating GopherCI and
the user viewing the results of a CI analysis may be different
people with different access, when an error occurrs, previously
only the operator would see the error, not the user who may be
able to fix it.

We need a mechanism for user's to view the results of an Execution,
including the output. This is done by requiring the database to
provide an analysis.Executer that the analysis can then wrap/decorate
a real executer, to record the output.

Analysis page to show outputs of analysis

runners dev1 gopherci io-analysis-415

Fixes #88.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-2.05%) to 57.924% when pulling 25ffe8c1471acce6ee943b98e6f62c9b264f5671 on error-handling into 04a08da9e38a2eac380f32c610bd86c1916ab7a5 on master.