Preparing report...

Report for github.com/hryyan/b2

A+    Excellent!    Found 13 issues across 24 files

Tweet

gofmt100%

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

No problems detected. Good job!


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.

    • b2/b2_test.go
    • Line 345: warning: cyclomatic complexity 37 of function (*FileTests).TestLargeFile() is high (> 15) (gocyclo)
    • Line 39: warning: cyclomatic complexity 36 of function (*FileTests).TestSmallFile() is high (> 15) (gocyclo)

golint54%

Golint is a linter for Go source code.

    • b2/auth.go
    • Line 11: warning: exported const AUTH_URL should have comment or be unexported (golint)
    • Line 13: warning: exported type AuthResponse should have comment or be unexported (golint)
    • b2/utils.go
    • Line 18: warning: exported type ProgressReaderWriter should have comment or be unexported (golint)
    • Line 139: warning: exported function GetKeyFromEnv should have comment or be unexported (golint)
    • b2/cli/cmd/root.go
    • Line 12: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 24: warning: exported function Execute should have comment or be unexported (golint)
    • b2/b2.go
    • Line 15: warning: exported method B2.GetAuth should have comment or be unexported (golint)
    • Line 19: warning: exported method B2.SetAuth should have comment or be unexported (golint)
    • b2/download.go
    • Line 141: warning: exported method B2.GetPublicFileDownloadURL should have comment or be unexported (golint)
    • b2/error.go
    • Line 13: warning: exported type ErrorResponse should have comment or be unexported (golint)
    • b2/models.go
    • Line 7: warning: exported type CorsRule should have comment or be unexported (golint)
    • Line 16: warning: exported type LifecycleRule should have comment or be unexported (golint)
    • Line 22: warning: exported type Bucket should have comment or be unexported (golint)
    • Line 32: warning: exported const PUBLIC should have comment or be unexported (golint)
    • Line 33: warning: exported const PRIVATE should have comment or be unexported (golint)
    • Line 35: warning: comment on exported const LIST_KEYS should be of the form "LIST_KEYS ..." (golint)
    • Line 37: warning: exported const WRITE_KEYS should have comment or be unexported (golint)
    • Line 38: warning: exported const DELETE_KEYS should have comment or be unexported (golint)
    • Line 39: warning: exported const LIST_BUCKETS should have comment or be unexported (golint)
    • Line 40: warning: exported const WRITE_BUCKETS should have comment or be unexported (golint)
    • Line 41: warning: exported const DELETE_BUCKETS should have comment or be unexported (golint)
    • Line 42: warning: exported const LIST_FILES should have comment or be unexported (golint)
    • Line 43: warning: exported const READ_FILES should have comment or be unexported (golint)
    • Line 44: warning: exported const SHARE_FILES should have comment or be unexported (golint)
    • Line 45: warning: exported const WRITE_FILES should have comment or be unexported (golint)
    • Line 46: warning: exported const DELETE_FILES should have comment or be unexported (golint)
    • Line 48: warning: exported type ApplicationKey should have comment or be unexported (golint)
    • Line 58: warning: exported type ApplicationKeys should have comment or be unexported (golint)
    • Line 63: warning: exported type FileInfo should have comment or be unexported (golint)
    • Line 65: warning: exported type File should have comment or be unexported (golint)
    • Line 76: warning: exported type DownloadUrlToken should have comment or be unexported (golint)
    • Line 81: warning: exported type UploadUrlToken should have comment or be unexported (golint)
    • Line 86: warning: exported type Part should have comment or be unexported (golint)
    • b2/cli/cmd/exit_code.go
    • Line 4: warning: exported const CREATE_SESSION_ERROR_EXIT should have comment (or a comment on this block) or be unexported (golint)
    • b2/cli/cmd/utils.go
    • Line 15: warning: exported type Login should have comment or be unexported (golint)
    • Line 20: warning: exported type Session should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign91%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words

    • b2/download.go
    • Line 49: warning: "downlaod" is a misspelling of "download" (misspell)
    • Line 96: warning: "downlaod" is a misspelling of "download" (misspell)