Preparing report...

Report for github.com/netlify/open-api/v2

A+    Excellent!    Found 9 issues across 20 files

Tweet

gofmt90%

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!


gocyclo95%

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.

    • open-api/v2/go/porcelain/deploy.go
    • Line 176: warning: cyclomatic complexity 35 of function (*Netlify).DoDeploy() is high (> 15) (gocyclo)
    • Line 405: warning: cyclomatic complexity 19 of function (*Netlify).uploadFile() is high (> 15) (gocyclo)
    • Line 509: warning: cyclomatic complexity 16 of function walk() is high (> 15) (gocyclo)

golint65%

Golint is a linter for Go source code.

    • open-api/v2/go/porcelain/netlify_client.go
    • Line 12: warning: exported const DefaultSyncFileLimit should have comment or be unexported (golint)
    • Line 13: warning: exported const DefaultConcurrentUploadLimit should have comment or be unexported (golint)
    • Line 14: warning: exported const DefaultRetryAttempts should have comment or be unexported (golint)
    • Line 58: warning: exported method Netlify.SetSyncFileLimit should have comment or be unexported (golint)
    • Line 64: warning: exported method Netlify.SetConcurrentUploadLimit should have comment or be unexported (golint)
    • open-api/v2/go/porcelain/context/context.go
    • Line 10: warning: exported type Context should have comment or be unexported (golint)
    • Line 14: warning: exported type Fields should have comment or be unexported (golint)
    • Line 16: warning: exported function WithAuthInfo should have comment or be unexported (golint)
    • Line 17: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 20: warning: exported function GetAuthInfo should have comment or be unexported (golint)
    • Line 24: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 25: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 28: warning: exported function GetLogger should have comment or be unexported (golint)
    • open-api/v2/go/porcelain/http/http.go
    • Line 14: warning: exported var DefaultTransport should have comment or be unexported (golint)
    • Line 16: warning: exported type RetryableTransport should have comment or be unexported (golint)
    • Line 26: warning: exported function NewRetryableTransport should have comment or be unexported (golint)
    • Line 33: warning: exported method RetryableTransport.Submit should have comment or be unexported (golint)
    • open-api/v2/go/porcelain/assets.go
    • Line 18: warning: exported type SiteAsset should have comment or be unexported (golint)
    • Line 26: warning: exported method Netlify.UploadNewSiteAsset should have comment or be unexported (golint)
    • Line 95: warning: exported method Netlify.AddSiteAsset should have comment or be unexported (golint)
    • Line 109: warning: exported method Netlify.UpdateSiteAsset should have comment or be unexported (golint)
    • Line 123: warning: exported method Netlify.ListSiteAssets should have comment or be unexported (golint)
    • Line 137: warning: exported method Netlify.ShowSiteAssetInfo should have comment or be unexported (golint)
    • Line 166: warning: exported method Netlify.GetSiteAssetPublicSignature should have comment or be unexported (golint)
    • open-api/v2/go/porcelain/auth.go
    • Line 18: warning: comment on exported method Netlify.CreateTicket should be of the form "CreateTicket ..." (golint)
    • Line 30: warning: exported method Netlify.ShowTicket should have comment or be unexported (golint)
    • Line 41: warning: exported method Netlify.ExchangeTicket should have comment or be unexported (golint)
    • Line 52: warning: exported method Netlify.WaitUntilTicketAuthorized should have comment or be unexported (golint)
    • open-api/v2/go/porcelain/deploy.go
    • Line 54: warning: exported type DeployObserver should have comment or be unexported (golint)
    • Line 69: warning: exported type DeployWarner should have comment or be unexported (golint)
    • Line 101: warning: exported type FileBundle should have comment or be unexported (golint)
    • Line 120: warning: exported method FileBundle.Seek should have comment or be unexported (golint)
    • Line 124: warning: exported method FileBundle.Close should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell95%

Misspell Finds commonly misspelled English words