Analysis for #78

Started2017-04-06 12:47:02 +0000 UTC
Build Status Success with 4 issues found.

Clone Duration

1.374s

Deps Duration

1m30.08s

Total Duration

2m16.492s

go vet Found 0 issues in 1.003s.
golint Found 1 issue in 707ms.
internal/analyser/analyser.go:244 golint: exported function ExportedNoComment should have comment or be unexported
apicompat Found 0 issues in 277ms.
gosimple Found 0 issues in 11.093s.
staticcheck Found 2 issues in 16.531s.
internal/analyser/analyser.go:95 staticcheck: empty branch (SA9003)
internal/db/sqldb.go:139 staticcheck: this value of err is never used (SA4006)
unused Found 1 issue in 12.369s.
internal/github/installation.go:26 unused: func unused is unused (U1000)

Issues

internal/analyser/analyser.go
@@ -92,6 +92,9 @@
92 return errors.Wrap(err, "analyser could create new executer")
93 }
94
95 if err != nil {
staticcheck: empty branch (SA9003)
96 }
97
98 var (
99 // baseRef is the reference to the base branch or before commit, the ref
100 // of the state before this PR/Push.
@@ -237,3 +240,5 @@
240 analysis.TotalDuration = db.Duration(time.Since(start))
241 return nil
242 }
243
244 func ExportedNoComment() {}
golint: exported function ExportedNoComment should have comment or be unexported
internal/db/sqldb.go
@@ -134,6 +134,13 @@
134 return nil
135 }
136
137 // Foo is an example of staticcheck's incredibly useful SA4006
138 func (db *SQLDB) Foo() error {
139 _, err := db.sqlx.Exec("SELECT 1")
staticcheck: this value of err is never used (SA4006)
140 _, err = db.sqlx.Exec("SELECT 1")
141 return err
142 }
143
144 // GetAnalysis implements the DB interface.
145 func (db *SQLDB) GetAnalysis(analysisID int) (*Analysis, error) {
146 analysis := NewAnalysis()
internal/github/installation.go
@@ -23,6 +23,9 @@
23 client *github.Client
24 }
25
26 func unused() {
unused: func unused is unused (U1000)
27 }
28
29 func (g *GitHub) NewInstallation(installationID int) (*Installation, error) {
30
31 // TODO reuse installations, so we maintain rate limit state between webhooks