Preparing report...

Report for github.com/upyun/upx

A+    Excellent!    Found 10 issues across 16 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!


golint43%

Golint is a linter for Go source code.

    • upx/io.go
    • Line 18: warning: exported type WrappedWriter should have comment or be unexported (golint)
    • Line 33: warning: exported method WrappedWriter.Close should have comment or be unexported (golint)
    • Line 37: warning: exported function NewFileWrappedWriter should have comment or be unexported (golint)
    • Line 50: warning: exported function Print should have comment or be unexported (golint)
    • Line 63: warning: exported function PrintOnlyVerbose should have comment or be unexported (golint)
    • Line 69: warning: exported function PrintError should have comment or be unexported (golint)
    • Line 79: warning: exported function PrintErrorAndExit should have comment or be unexported (golint)
    • upx/reader.go
    • Line 7: warning: exported type ProgressReader should have comment or be unexported (golint)
    • Line 12: warning: exported method ProgressReader.Len should have comment or be unexported (golint)
    • Line 17: warning: exported method ProgressReader.MD5 should have comment or be unexported (golint)
    • Line 27: warning: exported method ProgressReader.Copyed should have comment or be unexported (golint)
    • upx/upx.go
    • Line 12: warning: exported const VERSION should have comment or be unexported (golint)
    • upx/config.go
    • Line 14: warning: exported const LOGIN should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported type Config should have comment or be unexported (golint)
    • Line 26: warning: exported method Config.PopCurrent should have comment or be unexported (golint)
    • Line 35: warning: exported method Config.Insert should have comment or be unexported (golint)
    • upx/match.go
    • Line 11: warning: exported const TIME_NOT_SET should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported const ITEM_NOT_SET should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type MatchConfig should have comment or be unexported (golint)
    • Line 33: warning: exported function IsMatched should have comment or be unexported (golint)
    • upx/progress.go
    • Line 11: warning: exported function AddBar should have comment or be unexported (golint)
    • Line 14: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • upx/session.go
    • Line 23: warning: exported const SYNC_EXISTS should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type Session should have comment or be unexported (golint)
    • Line 99: warning: exported method Session.AbsPath should have comment or be unexported (golint)
    • Line 112: warning: exported method Session.IsUpYunDir should have comment or be unexported (golint)
    • Line 120: warning: exported method Session.IsLocalDir should have comment or be unexported (golint)
    • Line 128: warning: exported method Session.FormatUpInfo should have comment or be unexported (golint)
    • Line 147: warning: exported method Session.Init should have comment or be unexported (golint)
    • Line 159: warning: exported method Session.Info should have comment or be unexported (golint)
    • Line 175: warning: exported method Session.Pwd should have comment or be unexported (golint)
    • Line 179: warning: exported method Session.Mkdir should have comment or be unexported (golint)
    • Line 191: warning: exported method Session.Cd should have comment or be unexported (golint)
    • Line 201: warning: exported method Session.Ls should have comment or be unexported (golint)
    • Line 337: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 363: warning: exported method Session.Get should have comment or be unexported (golint)
    • Line 489: warning: exported method Session.Put should have comment or be unexported (golint)
    • Line 554: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 571: warning: exported method Session.Rm should have comment or be unexported (golint)
    • Line 679: warning: exported method Session.Tree should have comment or be unexported (golint)
    • Line 835: warning: exported method Session.Sync should have comment or be unexported (golint)
    • Line 905: warning: exported method Session.PostTask should have comment or be unexported (golint)
    • Line 936: warning: exported method Session.Purge should have comment or be unexported (golint)
    • upx/upgrade.go
    • Line 16: warning: exported const VERSION_URL should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function GetCurrentBinPath should have comment or be unexported (golint)
    • Line 25: warning: exported function GetLatestVersion should have comment or be unexported (golint)
    • Line 41: warning: exported function DownloadBin should have comment or be unexported (golint)
    • Line 65: warning: exported function ChmodAndRename should have comment or be unexported (golint)
    • Line 77: warning: exported function Upgrade should have comment or be unexported (golint)
    • upx/commands.go
    • Line 17: warning: exported const NO_CHECK should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported function Init should have comment or be unexported (golint)
    • Line 25: warning: exported function InitAndCheck should have comment or be unexported (golint)
    • Line 38: warning: exported function NewLoginCommand should have comment or be unexported (golint)
    • Line 84: warning: exported function NewLogoutCommand should have comment or be unexported (golint)
    • Line 103: warning: exported function NewAuthCommand should have comment or be unexported (golint)
    • Line 122: warning: exported function NewListSessionsCommand should have comment or be unexported (golint)
    • Line 140: warning: exported function NewSwitchSessionCommand should have comment or be unexported (golint)
    • Line 162: warning: exported function NewInfoCommand should have comment or be unexported (golint)
    • Line 174: warning: exported function NewMkdirCommand should have comment or be unexported (golint)
    • Line 186: warning: exported function NewCdCommand should have comment or be unexported (golint)
    • Line 203: warning: exported function NewPwdCommand should have comment or be unexported (golint)
    • Line 215: warning: exported function NewLsCommand should have comment or be unexported (golint)
    • Line 255: warning: exported function NewGetCommand should have comment or be unexported (golint)
    • Line 290: warning: exported function NewPutCommand should have comment or be unexported (golint)
    • Line 312: warning: exported function NewRmCommand should have comment or be unexported (golint)
    • Line 354: warning: exported function NewTreeCommand should have comment or be unexported (golint)
    • Line 374: warning: exported function NewSyncCommand should have comment or be unexported (golint)
    • Line 396: warning: exported function NewPostCommand should have comment or be unexported (golint)
    • Line 416: warning: exported function NewPurgeCommand should have comment or be unexported (golint)
    • Line 432: warning: exported function NewGetDBCommand should have comment or be unexported (golint)
    • Line 455: warning: exported function NewUpgradeCommand should have comment or be unexported (golint)

gocyclo93%

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.

    • upx/session.go
    • Line 201: warning: cyclomatic complexity 19 of function (*Session).Ls() is high (> 15) (gocyclo)

ineffassign87%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!