Preparing report...

Report for github.com/dollarshaveclub/furan

A    Great!    Found 35 issues across 49 files

Tweet

gofmt77%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo77%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • furan/pkg/grpc/grpc.go
    • Line 231: warning: cyclomatic complexity 31 of function (*Server).StartBuild() is high (> 15) (gocyclo)
    • Line 410: warning: cyclomatic complexity 16 of function (*Server).MonitorBuild() is high (> 15) (gocyclo)

golint51%

Golint is a linter for Go source code.

    • furan/pkg/buildkit/fake.go
    • Line 9: warning: exported type FakeBuilder should have comment or be unexported (golint)
    • Line 13: warning: exported method FakeBuilder.Build should have comment or be unexported (golint)
    • furan/pkg/jobrunner/jobrunner.go
    • Line 39: warning: exported type K8sJobRunner should have comment or be unexported (golint)
    • Line 53: warning: exported function NewInClusterRunner should have comment or be unexported (golint)
    • Line 273: warning: exported const DefaultJobWatcherTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 399: warning: exported method JobWatcher.Running should have comment or be unexported (golint)
    • Line 415: warning: exported var PodMaxLines should have comment or be unexported (golint)
    • furan/cmd/migrate.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • furan/pkg/config/config.go
    • Line 7: warning: exported type VaultConfig should have comment or be unexported (golint)
    • Line 17: warning: exported type GitHubConfig should have comment or be unexported (golint)
    • Line 21: warning: exported type QuayConfig should have comment or be unexported (golint)
    • Line 36: warning: exported type DBConfig should have comment or be unexported (golint)
    • Line 42: warning: exported type APMConfig should have comment or be unexported (golint)
    • Line 48: warning: exported type ServerConfig should have comment or be unexported (golint)
    • furan/pkg/datalayer/datalayer.go
    • Line 53: warning: exported var MaxPoolConns should have comment or be unexported (golint)
    • Line 70: warning: exported function NewRawPGClient should have comment or be unexported (golint)
    • Line 146: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 270: warning: exported method PostgresDBLayer.SetBuildCompletedTimestamp should have comment or be unexported (golint)
    • Line 275: warning: exported method PostgresDBLayer.SetBuildStatus should have comment or be unexported (golint)
    • Line 576: warning: exported method PostgresDBLayer.DeleteAPIKey should have comment or be unexported (golint)
    • furan/pkg/grpc/streamadapter.go
    • Line 52: warning: exported method MonitorStreamAdapter.Context should have comment or be unexported (golint)
    • Line 59: warning: exported method MonitorStreamAdapter.Send should have comment or be unexported (golint)
    • furan/pkg/models/models.go
    • Line 17: warning: exported type BuildStatus should have comment or be unexported (golint)
    • Line 20: warning: comment on exported const BuildStatusUnknown should be of the form "BuildStatusUnknown ..." (golint)
    • Line 22: warning: comment on exported const BuildStatusNotStarted should be of the form "BuildStatusNotStarted ..." (golint)
    • Line 24: warning: comment on exported const BuildStatusSkipped should be of the form "BuildStatusSkipped ..." (golint)
    • Line 26: warning: comment on exported const BuildStatusRunning should be of the form "BuildStatusRunning ..." (golint)
    • Line 28: warning: comment on exported const BuildStatusFailure should be of the form "BuildStatusFailure ..." (golint)
    • Line 30: warning: comment on exported const BuildStatusSuccess should be of the form "BuildStatusSuccess ..." (golint)
    • Line 32: warning: comment on exported const BuildStatusCancelRequested should be of the form "BuildStatusCancelRequested ..." (golint)
    • Line 34: warning: comment on exported const BuildStatusCancelled should be of the form "BuildStatusCancelled ..." (golint)
    • Line 38: warning: exported method BuildStatus.State should have comment or be unexported (golint)
    • Line 61: warning: exported function BuildStatusFromState should have comment or be unexported (golint)
    • Line 100: warning: exported type Build should have comment or be unexported (golint)
    • Line 124: warning: exported method Build.Running should have comment or be unexported (golint)
    • Line 187: warning: exported type JobRunner should have comment or be unexported (golint)
    • Line 212: warning: comment on exported type BuildManager should be of the form "BuildManager ..." (with optional leading article) (golint)
    • Line 218: warning: exported type TagChecker should have comment or be unexported (golint)
    • furan/pkg/tagcheck/fake.go
    • Line 3: warning: exported type FakeChecker should have comment or be unexported (golint)
    • Line 7: warning: exported method FakeChecker.AllTagsExist should have comment or be unexported (golint)
    • furan/pkg/jobrunner/fake.go
    • Line 5: warning: exported type FakeJob should have comment or be unexported (golint)
    • Line 13: warning: exported function NewFakeJob should have comment or be unexported (golint)
    • Line 21: warning: exported method FakeJob.Close should have comment or be unexported (golint)
    • Line 25: warning: exported method FakeJob.Running should have comment or be unexported (golint)
    • Line 28: warning: exported method FakeJob.Logs should have comment or be unexported (golint)
    • Line 32: warning: exported type FakeJobRunner should have comment or be unexported (golint)
    • Line 36: warning: exported method FakeJobRunner.Run should have comment or be unexported (golint)
    • furan/pkg/grpc/grpc.go
    • Line 37: warning: exported type Options should have comment or be unexported (golint)
    • Line 543: warning: exported method Server.ListBuilds should have comment or be unexported (golint)
    • furan/pkg/builder/fake.go
    • Line 11: warning: exported type FakeBuildManager should have comment or be unexported (golint)
    • Line 18: warning: exported method FakeBuildManager.Start should have comment or be unexported (golint)
    • Line 24: warning: exported method FakeBuildManager.Run should have comment or be unexported (golint)
    • furan/pkg/github/fake.go
    • Line 5: warning: exported type FakeFetcher should have comment or be unexported (golint)
    • Line 10: warning: exported method FakeFetcher.Fetch should have comment or be unexported (golint)
    • Line 17: warning: exported method FakeFetcher.GetCommitSHA should have comment or be unexported (golint)
    • furan/pkg/secrets/secrets.go
    • Line 14: warning: exported type BackendType should have comment or be unexported (golint)
    • Line 17: warning: exported const UnknownBackend should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported type SecretsClient should have comment or be unexported (golint)
    • Line 29: warning: exported type Fetcher should have comment or be unexported (golint)
    • Line 100: warning: exported method Fetcher.GitHub should have comment or be unexported (golint)
    • Line 109: warning: exported method Fetcher.Quay should have comment or be unexported (golint)
    • Line 118: warning: exported method Fetcher.AWS should have comment or be unexported (golint)
    • Line 127: warning: exported method Fetcher.Database should have comment or be unexported (golint)
    • furan/pkg/jsonapi/jsonapi.go
    • Line 23: warning: exported function NewHandlers should have comment or be unexported (golint)
    • Line 29: warning: exported var APIKeyHeader should have comment or be unexported (golint)
    • Line 44: warning: exported method Handlers.Register should have comment or be unexported (golint)
    • Line 68: warning: comment on exported method Handlers.BuildRequestHandler should be of the form "BuildRequestHandler ..." (golint)
    • Line 84: warning: exported method Handlers.BuildStatusHandler should have comment or be unexported (golint)
    • Line 99: warning: exported method Handlers.BuildCancelHandler should have comment or be unexported (golint)
    • furan/pkg/buildkit/buildkit.go
    • Line 32: warning: exported type LogFunc should have comment or be unexported (golint)
    • Line 34: warning: exported type BuildSolver should have comment or be unexported (golint)
    • Line 51: warning: exported function NewBuildSolver should have comment or be unexported (golint)
    • Line 195: warning: exported var SocketConnectTimeout should have comment or be unexported (golint)
    • Line 199: warning: comment on exported method BuildSolver.VerifyAddr should be of the form "VerifyAddr ..." (golint)
    • furan/cmd/integration.go
    • Line 49: warning: exported type IntegrationTest should have comment or be unexported (golint)
    • Line 59: warning: exported type IntegrationTests should have comment or be unexported (golint)
    • Line 239: warning: exported function NewInClusterK8sClient should have comment or be unexported (golint)
    • Line 251: warning: exported function GetAPIKey should have comment or be unexported (golint)
    • Line 261: warning: exported function WaitForFuranServer should have comment or be unexported (golint)
    • furan/pkg/auth/auth.go
    • Line 19: warning: exported type Provider should have comment or be unexported (golint)
    • Line 27: warning: exported function New should have comment or be unexported (golint)
    • Line 35: warning: exported method Provider.Register should have comment or be unexported (golint)
    • Line 39: warning: exported method Provider.Credentials should have comment or be unexported (golint)
    • Line 77: warning: exported method Provider.GetECRAuth should have comment or be unexported (golint)
    • furan/pkg/datalayer/fake.go
    • Line 14: warning: exported type FakeDataLayer should have comment or be unexported (golint)
    • Line 59: warning: exported method FakeDataLayer.CreateBuild should have comment or be unexported (golint)
    • Line 69: warning: exported method FakeDataLayer.GetBuildByID should have comment or be unexported (golint)
    • Line 80: warning: exported method FakeDataLayer.ListBuilds should have comment or be unexported (golint)
    • Line 171: warning: exported method FakeDataLayer.SetBuildCompletedTimestamp should have comment or be unexported (golint)
    • Line 182: warning: exported method FakeDataLayer.SetBuildStatus should have comment or be unexported (golint)
    • Line 193: warning: exported method FakeDataLayer.DeleteBuild should have comment or be unexported (golint)
    • Line 201: warning: exported method FakeDataLayer.ListenForBuildEvents should have comment or be unexported (golint)
    • Line 250: warning: exported method FakeDataLayer.AddEvent should have comment or be unexported (golint)
    • Line 272: warning: exported method FakeDataLayer.CancelBuild should have comment or be unexported (golint)
    • Line 292: warning: exported method FakeDataLayer.CancellationListeners should have comment or be unexported (golint)
    • Line 299: warning: exported method FakeDataLayer.ListenForCancellation should have comment or be unexported (golint)
    • Line 353: warning: exported method FakeDataLayer.SetBuildAsRunning should have comment or be unexported (golint)
    • Line 373: warning: exported method FakeDataLayer.ListenForBuildRunning should have comment or be unexported (golint)
    • Line 425: warning: exported method FakeDataLayer.SetBuildAsCompleted should have comment or be unexported (golint)
    • Line 445: warning: exported method FakeDataLayer.ListenForBuildCompleted should have comment or be unexported (golint)
    • Line 498: warning: exported method FakeDataLayer.CreateAPIKey should have comment or be unexported (golint)
    • Line 507: warning: exported method FakeDataLayer.GetAPIKey should have comment or be unexported (golint)
    • Line 518: warning: exported method FakeDataLayer.DeleteAPIKey should have comment or be unexported (golint)
    • furan/pkg/tagcheck/tagcheck.go
    • Line 5: warning: exported type Checker should have comment or be unexported (golint)
    • Line 10: warning: exported method Checker.AllTagsExist should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!