Preparing report...

Report for github.com/guonaihong/gout

A+    Excellent!    Found 36 issues across 135 files

Tweet

gofmt97%

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!


golint78%

Golint is a linter for Go source code.

    • gout/gout.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: comment on exported type DebugOption should be of the form "DebugOption ..." (with optional leading article) (golint)
    • Line 14: warning: exported type DebugOpt should have comment or be unexported (golint)
    • Line 15: warning: exported type DebugFunc should have comment or be unexported (golint)
    • Line 17: warning: exported function NoColor should have comment or be unexported (golint)
    • Line 21: warning: exported function Trace should have comment or be unexported (golint)
    • Line 25: warning: exported type Context should have comment or be unexported (golint)
    • Line 67: warning: comment on exported function NotIgnoreEmpty should be of the form "NotIgnoreEmpty ..." (golint)
    • Line 72: warning: comment on exported function IgnoreEmpty should be of the form "IgnoreEmpty ..." (golint)
    • Line 77: warning: comment on exported function SetTimeout should be of the form "SetTimeout ..." (golint)
    • gout/import.go
    • Line 14: warning: exported type Import should have comment or be unexported (golint)
    • Line 16: warning: exported function NewImport should have comment or be unexported (golint)
    • Line 22: warning: exported method Import.RawText should have comment or be unexported (golint)
    • gout/utils.go
    • Line 13: warning: comment on exported type A should be of the form "A ..." (with optional leading article) (golint)
    • gout/setting/setting.go
    • Line 5: warning: comment on exported type Setting should be of the form "Setting ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported method Setting.Chunked should be of the form "Chunked ..." (golint)
    • Line 32: warning: exported method Setting.SetTimeout should have comment or be unexported (golint)
    • Line 38: warning: exported method Setting.Reset should have comment or be unexported (golint)
    • gout/export/curl.go
    • Line 11: warning: exported type Curl should have comment or be unexported (golint)
    • Line 18: warning: exported method Curl.New should have comment or be unexported (golint)
    • Line 22: warning: exported method Curl.LongOption should have comment or be unexported (golint)
    • Line 27: warning: exported method Curl.GenAndSend should have comment or be unexported (golint)
    • Line 32: warning: exported method Curl.SetOutput should have comment or be unexported (golint)
    • Line 37: warning: exported method Curl.Do should have comment or be unexported (golint)
    • gout/encode/encode_core_test.go
    • Line 20: warning: don't use underscores in Go names; func testEncodeCore_Encode should be testEncodeCoreEncode (golint)
    • Line 52: warning: don't use underscores in Go names; func testEncodeCore_Encode_Fail should be testEncodeCoreEncodeFail (golint)
    • gout/filter/retry.go
    • Line 25: warning: exported var ErrRetryFail should have comment or be unexported (golint)
    • Line 40: warning: exported method Retry.New should have comment or be unexported (golint)
    • Line 62: warning: exported method Retry.Func should have comment or be unexported (golint)
    • gout/export/curl_core.go
    • Line 62: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gout/encode/form_test.go
    • Line 98: warning: don't use underscores in Go names; type test_Form should be testForm (golint)
    • Line 105: warning: don't use underscores in Go names; type test_Form_struct_fail should be testFormStructFail (golint)
    • Line 113: warning: don't use underscores in Go names; type test_Form_struct_fail2 should be testFormStructFail2 (golint)
    • Line 120: warning: don't use underscores in Go names; type test_Form_Second_struct_fail should be testFormSecondStructFail (golint)
    • Line 127: warning: don't use underscores in Go names; type test_Form_Second_struct_fail2 should be testFormSecondStructFail2 (golint)
    • Line 134: warning: don't use underscores in Go names; type test_Form_Second_struct_Type_fail should be testFormSecondStructTypeFail (golint)
    • Line 141: warning: don't use underscores in Go names; type test_Form_Second_struct_Inner_fail should be testFormSecondStructInnerFail (golint)
    • Line 147: warning: don't use underscores in Go names; type test_Form_Second_struct_Inner_fail2 should be testFormSecondStructInnerFail2 (golint)
    • Line 232: warning: don't use underscores in Go names; type test_Form_struct should be testFormStruct (golint)
    • Line 240: warning: don't use underscores in Go names; type test_Form_Second_struct should be testFormSecondStruct (golint)
    • Line 248: warning: don't use underscores in Go names; type test_Form_Third_struct should be testFormThirdStruct (golint)
    • Line 254: warning: don't use underscores in Go names; type test_Form_Third_struct2 should be testFormThirdStruct2 (golint)
    • Line 260: warning: don't use underscores in Go names; type test_Form_struct3 should be testFormStruct3 (golint)
    • gout/encode/protobuf.go
    • Line 11: warning: exported var ErrNotImplMessage should have comment or be unexported (golint)
    • Line 13: warning: exported type ProtoBufEncode should have comment or be unexported (golint)
    • Line 17: warning: exported function NewProtoBufEncode should have comment or be unexported (golint)
    • Line 21: warning: exported method ProtoBufEncode.Encode should have comment or be unexported (golint)
    • Line 45: warning: exported method ProtoBufEncode.Name should have comment or be unexported (golint)
    • gout/dataflow/dataflow.go
    • Line 136: warning: exported method DataFlow.SetRequest should have comment or be unexported (golint)
    • Line 339: warning: comment on exported method DataFlow.Chunked should be of the form "Chunked ..." (golint)
    • Line 359: warning: comment on exported method DataFlow.RequestUse should be of the form "RequestUse ..." (golint)
    • Line 383: warning: comment on exported method DataFlow.NoAutoContentType should be of the form "NoAutoContentType ..." (golint)
    • Line 394: warning: exported method DataFlow.IsDebug should have comment or be unexported (golint)
    • Line 423: warning: exported method DataFlow.SetGout should have comment or be unexported (golint)
    • gout/core/core.go
    • Line 28: warning: comment on exported type A should be of the form "A ..." (with optional leading article) (golint)
    • Line 68: warning: exported function CloneRequest should have comment or be unexported (golint)
    • Line 84: warning: exported function GetBytes should have comment or be unexported (golint)
    • Line 94: warning: exported function GetString should have comment or be unexported (golint)
    • gout/core/port.go
    • Line 8: warning: comment on exported function GetNoPortExists should be of the form "GetNoPortExists ..." (golint)
    • gout/encode/xml.go
    • Line 11: warning: exported var ErrNotXML should have comment or be unexported (golint)
    • Line 47: warning: exported function XMLValid should have comment or be unexported (golint)
    • gout/dataflow/req.go
    • Line 21: warning: exported type Do should have comment or be unexported (golint)
    • Line 346: warning: comment on exported method Req.GetContext should be of the form "GetContext ..." (golint)
    • Line 407: warning: exported method Req.Bind should have comment or be unexported (golint)
    • Line 435: warning: exported method Req.Client should have comment or be unexported (golint)
    • gout/filter/bench.go
    • Line 22: warning: exported function NewBench should have comment or be unexported (golint)
    • Line 26: warning: comment on exported method Bench.New should be of the form "New ..." (golint)
    • Line 55: warning: exported method Bench.Loop should have comment or be unexported (golint)
    • Line 75: warning: exported method Bench.GetReport should have comment or be unexported (golint)
    • gout/decode/decode.go
    • Line 7: warning: comment on exported type Decoder2 should be of the form "Decoder2 ..." (with optional leading article) (golint)
    • gout/encode/yaml.go
    • Line 10: warning: exported var ErrNotYAML should have comment or be unexported (golint)
    • Line 44: warning: exported function YAMLValid should have comment or be unexported (golint)
    • gout/dataflow/filter_interface.go
    • Line 9: warning: exported type NewFilter should have comment or be unexported (golint)
    • Line 13: warning: exported type Bencher should have comment or be unexported (golint)
    • Line 23: warning: exported type Retry should have comment or be unexported (golint)
    • Line 31: warning: exported type Filter should have comment or be unexported (golint)
    • Line 36: warning: exported type Curl should have comment or be unexported (golint)
    • Line 43: warning: exported type Export should have comment or be unexported (golint)

gocyclo97%

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.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words