Preparing report...

Report for github.com/Hexilee/gotten

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


gocyclo92%

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.

    • gotten/VarsCtr.go
    • Line 316: warning: cyclomatic complexity 24 of function (*VarsParser).checkContentType() is high (> 15) (gocyclo)
    • Line 249: warning: cyclomatic complexity 23 of function (*VarsParser).parse() is high (> 15) (gocyclo)
    • Line 526: warning: cyclomatic complexity 18 of function (*VarsCtr).setValuesByIOFields() is high (> 15) (gocyclo)

golint37%

Golint is a linter for Go source code.

    • gotten/Unmarshaler.go
    • Line 10: warning: exported type ReadUnmarshaler should have comment or be unexported (golint)
    • Line 14: warning: exported type ReadUnmarshalFunc should have comment or be unexported (golint)
    • Line 16: warning: exported type ReaderAdapter should have comment or be unexported (golint)
    • Line 20: warning: exported type Unmarshaler should have comment or be unexported (golint)
    • Line 24: warning: exported type UnmarshalFunc should have comment or be unexported (golint)
    • Line 27: warning: exported function UnmarshalAdapter should have comment or be unexported (golint)
    • Line 35: warning: exported function NewReaderAdapter should have comment or be unexported (golint)
    • Line 39: warning: exported method UnmarshalFunc.Unmarshal should have comment or be unexported (golint)
    • Line 43: warning: exported method ReadUnmarshalFunc.Unmarshal should have comment or be unexported (golint)
    • Line 47: warning: exported method ReaderAdapter.Unmarshal should have comment or be unexported (golint)
    • gotten/VarsCtr.go
    • Line 23: warning: exported const PathKeyRegexp should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: comment on exported const NullStr should be of the form "NullStr ..." (golint)
    • Line 32: warning: exported var ZeroStringer should have comment or be unexported (golint)
    • Line 38: warning: exported type VarsController should have comment or be unexported (golint)
    • Line 47: warning: exported type VarsParser should have comment or be unexported (golint)
    • Line 56: warning: exported type VarsCtr should have comment or be unexported (golint)
    • Line 74: warning: comment on exported type Field should be of the form "Field ..." (with optional leading article) (golint)
    • Line 86: warning: comment on exported type IOField should be of the form "IOField ..." (with optional leading article) (golint)
    • Line 97: warning: exported type MultipartReader should have comment or be unexported (golint)
    • Line 102: warning: exported type PathKeyList should have comment or be unexported (golint)
    • Line 367: warning: exported method VarsParser.Build should have comment or be unexported (golint)
    • gotten/headers/headers.go
    • Line 4: warning: exported const HeaderAccept should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: comment on exported const HeaderAccessControlRequestMethod should be of the form "HeaderAccessControlRequestMethod ..." (golint)
    • Line 41: warning: comment on exported const HeaderStrictTransportSecurity should be of the form "HeaderStrictTransportSecurity ..." (golint)
    • Line 52: warning: exported const MIMEApplicationJSON should have comment (or a comment on this block) or be unexported (golint)
    • gotten/unmarshalers/FileCtr.go
    • Line 18: warning: exported type FilenameStrategy should have comment or be unexported (golint)
    • Line 20: warning: exported type FileCtrBuilder should have comment or be unexported (golint)
    • Line 27: warning: exported type FileCtr should have comment or be unexported (golint)
    • Line 34: warning: exported type FileInfo should have comment or be unexported (golint)
    • Line 45: warning: comment on exported const ContentDisposition should be of the form "ContentDisposition ..." (golint)
    • Line 47: warning: exported const Hash should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported const ZeroStr should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported method FileCtrBuilder.SetBasePath should have comment or be unexported (golint)
    • Line 61: warning: exported method FileCtrBuilder.SetExtName should have comment or be unexported (golint)
    • Line 66: warning: exported method FileCtrBuilder.Discard should have comment or be unexported (golint)
    • Line 71: warning: exported method FileCtrBuilder.SetStrategy should have comment or be unexported (golint)
    • Line 76: warning: exported method FileCtrBuilder.Build should have comment or be unexported (golint)
    • Line 92: warning: exported function NewFileCtr should have comment or be unexported (golint)
    • Line 101: warning: exported method FileCtr.Unmarshal should have comment or be unexported (golint)
    • gotten/TagKeys.go
    • Line 4: warning: exported const KeyKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 7: warning: comment on exported const KeyPath should be of the form "KeyPath ..." (golint)
    • gotten/Response.go
    • Line 11: warning: exported type Response should have comment or be unexported (golint)
    • Line 32: warning: exported type ResponseImpl should have comment or be unexported (golint)
    • Line 42: warning: exported method ResponseImpl.StatusCode should have comment or be unexported (golint)
    • Line 46: warning: exported method ResponseImpl.Header should have comment or be unexported (golint)
    • Line 50: warning: exported method ResponseImpl.Body should have comment or be unexported (golint)
    • Line 54: warning: exported method ResponseImpl.ContentType should have comment or be unexported (golint)
    • Line 58: warning: exported method ResponseImpl.Unmarshal should have comment or be unexported (golint)
    • gotten/mock/client.go
    • Line 11: warning: exported const HostNotExist should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type ClientBuilder should have comment or be unexported (golint)
    • Line 20: warning: exported type ClientImpl should have comment or be unexported (golint)
    • Line 25: warning: exported function NewClientBuilder should have comment or be unexported (golint)
    • Line 31: warning: comment on exported method ClientBuilder.Register should be of the form "Register ..." (golint)
    • Line 36: warning: exported method ClientBuilder.RegisterFunc should have comment or be unexported (golint)
    • Line 40: warning: exported method ClientBuilder.Build should have comment or be unexported (golint)
    • Line 44: warning: exported method ClientImpl.Do should have comment or be unexported (golint)
    • Line 58: warning: exported function HostNotExistError should have comment or be unexported (golint)
    • gotten/ErrorMessages.go
    • Line 12: warning: exported const BaseUrlCannotBeEmpty should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported function MustPassPtrToImplError should have comment or be unexported (golint)
    • Line 34: warning: exported function ServiceMustBeStructError should have comment or be unexported (golint)
    • Line 38: warning: exported function UnrecognizedHTTPMethodError should have comment or be unexported (golint)
    • Line 42: warning: exported function ParamTypeMustBePtrOfStructError should have comment or be unexported (golint)
    • Line 46: warning: exported function ValueIsNotStringError should have comment or be unexported (golint)
    • Line 50: warning: exported function ValueIsNotIntError should have comment or be unexported (golint)
    • Line 54: warning: exported function DuplicatedPathKeyError should have comment or be unexported (golint)
    • Line 58: warning: exported function UnsupportedValueTypeError should have comment or be unexported (golint)
    • Line 62: warning: exported function UnrecognizedPathKeyError should have comment or be unexported (golint)
    • Line 66: warning: exported function EmptyRequiredVariableError should have comment or be unexported (golint)
    • Line 70: warning: exported function UnsupportedFieldTypeError should have comment or be unexported (golint)
    • Line 71: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 74: warning: exported function SomePathVarHasNoValueError should have comment or be unexported (golint)
    • Line 85: warning: exported function NoUnmarshalerFoundForResponseError should have comment or be unexported (golint)
    • Line 86: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 89: warning: exported function ContentTypeConflictError should have comment or be unexported (golint)
    • Line 90: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 93: warning: exported function UnsupportedFuncTypeError should have comment or be unexported (golint)
    • gotten/interfaceTypes.go
    • Line 11: warning: exported type Types should have comment or be unexported (golint)
    • Line 23: warning: exported var StringerType should have comment or be unexported (golint)
    • gotten/unmarshalers/ErrorMessages.go
    • Line 9: warning: exported const ContentDispositionOrFilenameEmpty should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported function UnsupportedFilenameStrategyError should have comment or be unexported (golint)
    • Line 15: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • gotten/example/simple.go
    • Line 10: warning: exported type SimpleParams should have comment or be unexported (golint)
    • Line 15: warning: exported type Item should have comment or be unexported (golint)
    • Line 22: warning: exported type ExpectResult should have comment or be unexported (golint)
    • Line 23: warning: exported type ObjectNotFound should have comment or be unexported (golint)
    • Line 29: warning: exported type SimpleService should have comment or be unexported (golint)
    • gotten/Checker.go
    • Line 10: warning: exported type CheckerFactory should have comment or be unexported (golint)
    • Line 15: warning: exported type CheckerFunc should have comment or be unexported (golint)
    • Line 17: warning: exported type Checker should have comment or be unexported (golint)
    • Line 21: warning: exported type HeaderSet should have comment or be unexported (golint)
    • Line 22: warning: exported type StatusSet should have comment or be unexported (golint)
    • Line 25: warning: exported method CheckerFunc.Check should have comment or be unexported (golint)
    • Line 59: warning: exported method CheckerFactory.When should have comment or be unexported (golint)
    • Line 67: warning: exported method CheckerFactory.WhenStatuses should have comment or be unexported (golint)
    • Line 75: warning: exported method CheckerFactory.WhenContentType should have comment or be unexported (golint)
    • Line 97: warning: exported method CheckerFactory.Create should have comment or be unexported (golint)
    • Line 124: warning: exported function Any should have comment or be unexported (golint)
    • gotten/Creator.go
    • Line 16: warning: exported type Builder should have comment or be unexported (golint)
    • Line 24: warning: exported type Creator should have comment or be unexported (golint)
    • Line 32: warning: exported type ConditionalUnmarshaler should have comment or be unexported (golint)
    • Line 37: warning: exported type ConditionalUnmarshalers should have comment or be unexported (golint)
    • Line 41: warning: exported var DefaultUnmarshalers should have comment or be unexported (golint)
    • Line 68: warning: exported function NewBuilder should have comment or be unexported (golint)
    • Line 76: warning: exported method Builder.SetBaseUrl should have comment or be unexported (golint)
    • Line 81: warning: exported method Builder.AddCookie should have comment or be unexported (golint)
    • Line 86: warning: exported method Builder.AddCookies should have comment or be unexported (golint)
    • Line 91: warning: exported method Builder.SetHeader should have comment or be unexported (golint)
    • Line 96: warning: exported method Builder.AddHeader should have comment or be unexported (golint)
    • Line 101: warning: exported method Builder.AddUnmarshaler should have comment or be unexported (golint)
    • Line 105: warning: exported method Builder.AddUnmarshalFunc should have comment or be unexported (golint)
    • Line 109: warning: exported method Builder.AddReaderUnmarshaler should have comment or be unexported (golint)
    • Line 114: warning: exported method Builder.AddReadUnmarshalFunc should have comment or be unexported (golint)
    • Line 118: warning: exported method Builder.SetClient should have comment or be unexported (golint)
    • Line 123: warning: exported method Builder.Build should have comment or be unexported (golint)
    • Line 147: warning: comment on exported method Creator.Impl should be of the form "Impl ..." (golint)
    • Line 329: warning: exported method ConditionalUnmarshalers.Check should have comment or be unexported (golint)
    • gotten/Reader.go
    • Line 6: warning: exported type Reader should have comment or be unexported (golint)
    • Line 11: warning: exported type ReadCloser should have comment or be unexported (golint)
    • Line 16: warning: exported type ReaderImpl should have comment or be unexported (golint)
    • Line 26: warning: exported method ReaderImpl.Close should have comment or be unexported (golint)
    • Line 33: warning: exported method ReaderImpl.Empty should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!