Preparing report...

Report for github.com/qiniu/x

A+    Excellent!    Found 17 issues across 38 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!


gocyclo94%

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.


golint60%

Golint is a linter for Go source code.

    • x/bytes/seekable/seekable.go
    • Line 1: warning: package comment should be of the form "Package seekable ..." (golint)
    • Line 15: warning: exported type Seekabler should have comment or be unexported (golint)
    • Line 21: warning: exported type SeekableCloser should have comment or be unexported (golint)
    • Line 33: warning: exported var ErrNoBody should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 52: warning: exported function ReadAll should have comment or be unexported (golint)
    • x/xlog/xlog.go
    • Line 12: warning: should not use dot imports (golint)
    • Line 16: warning: exported const Ldate should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported const Ldebug should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type Logger should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • Line 48: warning: exported function NewWith should have comment or be unexported (golint)
    • Line 57: warning: exported method Logger.Spawn should have comment or be unexported (golint)
    • Line 84: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 91: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 100: warning: exported method Logger.Infof should have comment or be unexported (golint)
    • Line 107: warning: exported method Logger.Info should have comment or be unexported (golint)
    • Line 116: warning: exported method Logger.Warnf should have comment or be unexported (golint)
    • Line 120: warning: exported method Logger.Warn should have comment or be unexported (golint)
    • Line 126: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 177: warning: exported method Logger.Stack should have comment or be unexported (golint)
    • Line 187: warning: exported method Logger.SingleStack should have comment or be unexported (golint)
    • Line 199: warning: exported function SetOutput should have comment or be unexported (golint)
    • Line 203: warning: exported function SetFlags should have comment or be unexported (golint)
    • Line 207: warning: exported function SetOutputLevel should have comment or be unexported (golint)
    • x/rpc/rpc_client.go
    • Line 15: warning: should not use dot imports (golint)
    • Line 19: warning: exported var UserAgent should have comment or be unexported (golint)
    • Line 23: warning: exported var ErrInvalidRequestURL should have comment or be unexported (golint)
    • Line 28: warning: exported type Client should have comment or be unexported (golint)
    • Line 33: warning: exported var DefaultClient should have comment or be unexported (golint)
    • Line 38: warning: exported function NewRequest should have comment or be unexported (golint)
    • Line 64: warning: exported method Client.DoRequest should have comment or be unexported (golint)
    • Line 73: warning: exported method Client.DoRequestWith should have comment or be unexported (golint)
    • Line 86: warning: exported method Client.DoRequestWith64 should have comment or be unexported (golint)
    • Line 99: warning: exported method Client.DoRequestWithForm should have comment or be unexported (golint)
    • Line 115: warning: exported method Client.DoRequestWithJson should have comment or be unexported (golint)
    • Line 126: warning: exported method Client.Do should have comment or be unexported (golint)
    • Line 174: warning: exported type ErrorInfo should have comment or be unexported (golint)
    • Line 182: warning: exported method ErrorInfo.ErrorDetail should have comment or be unexported (golint)
    • Line 193: warning: exported method ErrorInfo.RpcError should have comment or be unexported (golint)
    • Line 198: warning: exported method ErrorInfo.HttpCode should have comment or be unexported (golint)
    • Line 226: warning: exported function ResponseError should have comment or be unexported (golint)
    • Line 243: warning: exported function CallRet should have comment or be unexported (golint)
    • Line 264: warning: exported method Client.CallWithForm should have comment or be unexported (golint)
    • Line 274: warning: exported method Client.CallWithJson should have comment or be unexported (golint)
    • Line 284: warning: exported method Client.CallWith should have comment or be unexported (golint)
    • Line 294: warning: exported method Client.CallWith64 should have comment or be unexported (golint)
    • Line 304: warning: exported method Client.Call should have comment or be unexported (golint)
    • x/config/load_conf.go
    • Line 16: warning: exported function Init should have comment or be unexported (golint)
    • Line 16: warning: don't use underscores in Go names; func parameter default_conf should be defaultConf (golint)
    • Line 22: warning: exported function GetPath should have comment or be unexported (golint)
    • Line 30: warning: exported function Load should have comment or be unexported (golint)
    • Line 40: warning: exported function LoadEx should have comment or be unexported (golint)
    • Line 56: warning: exported function LoadFile should have comment or be unexported (golint)
    • Line 67: warning: exported function LoadBytes should have comment or be unexported (golint)
    • Line 72: warning: exported function LoadString should have comment or be unexported (golint)
    • x/bytes/bytes.go
    • Line 10: warning: exported type Reader should have comment or be unexported (golint)
    • Line 15: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 19: warning: exported method Reader.Len should have comment or be unexported (golint)
    • Line 26: warning: exported method Reader.Bytes should have comment or be unexported (golint)
    • Line 30: warning: exported method Reader.SeekToBegin should have comment or be unexported (golint)
    • Line 35: warning: exported method Reader.Seek should have comment or be unexported (golint)
    • Line 69: warning: exported method Reader.Close should have comment or be unexported (golint)
    • Line 75: warning: exported type Writer should have comment or be unexported (golint)
    • Line 80: warning: exported function NewWriter should have comment or be unexported (golint)
    • Line 94: warning: exported method Writer.Len should have comment or be unexported (golint)
    • Line 98: warning: exported method Writer.Bytes should have comment or be unexported (golint)
    • Line 102: warning: exported method Writer.Reset should have comment or be unexported (golint)
    • Line 108: warning: exported type Buffer should have comment or be unexported (golint)
    • Line 112: warning: exported function NewBuffer should have comment or be unexported (golint)
    • Line 116: warning: exported method Buffer.ReadAt should have comment or be unexported (golint)
    • Line 128: warning: exported method Buffer.WriteAt should have comment or be unexported (golint)
    • Line 143: warning: exported method Buffer.WriteStringAt should have comment or be unexported (golint)
    • Line 158: warning: exported method Buffer.Truncate should have comment or be unexported (golint)
    • Line 169: warning: exported method Buffer.Buffer should have comment or be unexported (golint)
    • Line 173: warning: exported method Buffer.Len should have comment or be unexported (golint)
    • x/reqid/reqid.go
    • Line 9: warning: should not use dot imports (golint)
    • Line 31: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 35: warning: exported function NewContextWith should have comment or be unexported (golint)
    • Line 46: warning: exported function FromContext should have comment or be unexported (golint)
    • x/bytes/replace.go
    • Line 9: warning: exported function ReplaceAt should have comment or be unexported (golint)
    • Line 29: warning: exported function ReplaceOne should have comment or be unexported (golint)
    • Line 40: warning: exported function Replace should have comment or be unexported (golint)
    • x/mockhttp/mockhttp.go
    • Line 15: warning: exported var ErrServerNotFound should have comment or be unexported (golint)
    • Line 43: warning: exported type Transport should have comment or be unexported (golint)
    • Line 47: warning: exported function NewTransport should have comment or be unexported (golint)
    • Line 54: warning: exported method Transport.ListenAndServe should have comment or be unexported (golint)
    • Line 62: warning: exported method Transport.RoundTrip should have comment or be unexported (golint)
    • Line 102: warning: exported var DefaultTransport should have comment or be unexported (golint)
    • Line 103: warning: exported var DefaultClient should have comment or be unexported (golint)
    • Line 105: warning: exported function ListenAndServe should have comment or be unexported (golint)
    • x/doc.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • x/url/urlescape.go
    • Line 7: warning: exported type Encoding should have comment or be unexported (golint)
    • Line 10: warning: exported const EncodePath should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type EscapeError should have comment or be unexported (golint)
    • Line 99: warning: exported function Unescape should have comment or be unexported (golint)
    • Line 167: warning: exported function Escape should have comment or be unexported (golint)
    • Line 172: warning: exported function EscapeEx should have comment or be unexported (golint)
    • x/config/getdir.go
    • Line 14: warning: exported var ErrHomeNotFound should have comment or be unexported (golint)
    • Line 28: warning: exported function GetDir should have comment or be unexported (golint)
    • x/cmdline/cmdline.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 48: warning: error var EOF should have name of the form ErrFoo (golint)
    • Line 48: warning: exported var EOF should have comment or be unexported (golint)
    • Line 63: warning: exported function Skip should have comment or be unexported (golint)
    • Line 73: warning: exported function Find should have comment or be unexported (golint)
    • Line 101: warning: exported type Parser should have comment or be unexported (golint)
    • Line 107: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 128: warning: don't use underscores in Go names; const endMask_QuotString should be endMaskQuotString (golint)
    • Line 129: warning: don't use underscores in Go names; const endMask_NonquotString should be endMaskNonquotString (golint)
    • Line 227: warning: exported method Parser.ParseCmd should have comment or be unexported (golint)
    • Line 239: warning: exported method Parser.ParseCode should have comment or be unexported (golint)
    • x/ctype/ctype.go
    • Line 4: warning: exported const UPPER should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported const BLANK should have comment (or a comment on this block) or be unexported (golint)
    • Line 187: warning: exported function Is should have comment or be unexported (golint)
    • Line 195: warning: exported function IsType should have comment or be unexported (golint)
    • Line 208: warning: exported function IsTypeEx should have comment or be unexported (golint)
    • Line 227: warning: exported function IsCSymbol should have comment or be unexported (golint)
    • Line 232: warning: exported function IsXmlSymbol should have comment or be unexported (golint)
    • x/bytes/doc.go
    • Line 1: warning: package comment should be of the form "Package bytes ..." (golint)
    • x/rpc/gob/gobrpc_client.go
    • Line 13: warning: should not use dot imports (golint)
    • Line 18: warning: exported function Register should have comment or be unexported (golint)
    • Line 23: warning: exported function RegisterName should have comment or be unexported (golint)
    • Line 30: warning: exported function ResponseError should have comment or be unexported (golint)
    • Line 49: warning: exported function CallRet should have comment or be unexported (golint)
    • Line 72: warning: exported type Client should have comment or be unexported (golint)
    • Line 77: warning: exported var DefaultClient should have comment or be unexported (golint)
    • Line 80: warning: exported method Client.Call should have comment or be unexported (golint)
    • Line 90: warning: exported method Client.CallWithGob 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!


misspell97%

Misspell Finds commonly misspelled English words

    • x/ts/expect.go
    • Line 79: warning: "ouput" is a misspelling of "output" (misspell)
    • Line 85: warning: "ouput" is a misspelling of "output" (misspell)