Preparing report...

Report for github.com/yycoder/thrifter

(v0.0.2)

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

    • thrifter/namespace.go
    • Line 3: warning: exported type Namespace should have comment or be unexported (golint)
    • Line 10: warning: exported function NewNamespace should have comment or be unexported (golint)
    • Line 19: warning: exported method Namespace.NodeValue should have comment or be unexported (golint)
    • Line 23: warning: exported method Namespace.NodeType should have comment or be unexported (golint)
    • thrifter/thrift.go
    • Line 3: warning: exported type Thrift should have comment or be unexported (golint)
    • Line 11: warning: exported function NewThrift should have comment or be unexported (golint)
    • Line 20: warning: exported method Thrift.NodeType should have comment or be unexported (golint)
    • Line 24: warning: exported method Thrift.NodeValue should have comment or be unexported (golint)
    • thrifter/token.go
    • Line 65: warning: don't use underscores in Go names; const tCPP_INCLUDE should be tCPPINCLUDE (golint)
    • Line 86: warning: exported function GetToken should have comment or be unexported (golint)
    • thrifter/types.go
    • Line 5: warning: exported type NodeCommonField should have comment or be unexported (golint)
    • Line 13: warning: exported type Token should have comment or be unexported (golint)
    • Line 22: warning: exported type Node should have comment or be unexported (golint)
    • thrifter/const.go
    • Line 4: warning: exported const CONST_VALUE_INT should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported type Const should have comment or be unexported (golint)
    • Line 19: warning: exported function NewConst should have comment or be unexported (golint)
    • Line 28: warning: exported method Const.NodeType should have comment or be unexported (golint)
    • Line 32: warning: exported method Const.NodeValue should have comment or be unexported (golint)
    • Line 68: warning: exported type ConstValue should have comment or be unexported (golint)
    • Line 76: warning: exported function NewConstValue should have comment or be unexported (golint)
    • Line 84: warning: exported method ConstValue.NodeType should have comment or be unexported (golint)
    • Line 88: warning: exported method ConstValue.NodeValue should have comment or be unexported (golint)
    • Line 157: warning: exported type ConstMap should have comment or be unexported (golint)
    • Line 165: warning: exported function NewConstMap should have comment or be unexported (golint)
    • Line 175: warning: exported method ConstMap.NodeValue should have comment or be unexported (golint)
    • Line 179: warning: exported method ConstMap.NodeType should have comment or be unexported (golint)
    • Line 227: warning: exported type ConstList should have comment or be unexported (golint)
    • Line 232: warning: exported function NewConstList should have comment or be unexported (golint)
    • Line 241: warning: exported method ConstList.NodeType should have comment or be unexported (golint)
    • Line 245: warning: exported method ConstList.NodeValue should have comment or be unexported (golint)
    • thrifter/field_type.go
    • Line 12: warning: exported type FieldType should have comment or be unexported (golint)
    • Line 23: warning: exported function NewFieldType should have comment or be unexported (golint)
    • Line 31: warning: exported method FieldType.NodeType should have comment or be unexported (golint)
    • Line 35: warning: exported method FieldType.NodeValue should have comment or be unexported (golint)
    • thrifter/include.go
    • Line 3: warning: exported type Include should have comment or be unexported (golint)
    • Line 8: warning: exported function NewInclude should have comment or be unexported (golint)
    • Line 17: warning: exported method Include.NodeType should have comment or be unexported (golint)
    • Line 21: warning: exported method Include.NodeValue should have comment or be unexported (golint)
    • thrifter/map.go
    • Line 3: warning: exported type MapType should have comment or be unexported (golint)
    • Line 11: warning: exported function NewMapType should have comment or be unexported (golint)
    • Line 20: warning: exported method MapType.NodeType should have comment or be unexported (golint)
    • Line 24: warning: exported method MapType.NodeValue should have comment or be unexported (golint)
    • thrifter/list.go
    • Line 3: warning: exported type ListType should have comment or be unexported (golint)
    • Line 9: warning: exported function NewListType should have comment or be unexported (golint)
    • Line 18: warning: exported method ListType.NodeValue should have comment or be unexported (golint)
    • Line 22: warning: exported method ListType.NodeType should have comment or be unexported (golint)
    • thrifter/struct.go
    • Line 4: warning: exported const STRUCT should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: exported type Struct should have comment or be unexported (golint)
    • Line 17: warning: exported function NewStruct should have comment or be unexported (golint)
    • Line 36: warning: exported method Struct.NodeType should have comment or be unexported (golint)
    • Line 48: warning: exported method Struct.NodeValue should have comment or be unexported (golint)
    • thrifter/typedef.go
    • Line 3: warning: exported type TypeDef should have comment or be unexported (golint)
    • Line 10: warning: exported function NewTypeDef should have comment or be unexported (golint)
    • Line 19: warning: exported method TypeDef.NodeType should have comment or be unexported (golint)
    • Line 23: warning: exported method TypeDef.NodeValue should have comment or be unexported (golint)
    • thrifter/option.go
    • Line 3: warning: comment on exported type Option should be of the form "Option ..." (with optional leading article) (golint)
    • Line 10: warning: exported function NewOption should have comment or be unexported (golint)
    • Line 18: warning: exported method Option.NodeType should have comment or be unexported (golint)
    • Line 22: warning: exported method Option.NodeValue should have comment or be unexported (golint)
    • thrifter/parser.go
    • Line 11: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 31: warning: exported type Parser should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method Parser.Parse should be of the form "Parse ..." (golint)
    • Line 237: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 280: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 342: warning: error should be the last type when returning multiple items (golint)
    • Line 368: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • thrifter/enum.go
    • Line 5: warning: exported type Enum should have comment or be unexported (golint)
    • Line 12: warning: exported function NewEnum should have comment or be unexported (golint)
    • Line 21: warning: exported method Enum.NodeType should have comment or be unexported (golint)
    • Line 25: warning: exported method Enum.NodeValue should have comment or be unexported (golint)
    • Line 68: warning: exported type EnumElement should have comment or be unexported (golint)
    • Line 75: warning: exported function NewEnumElement should have comment or be unexported (golint)
    • Line 83: warning: exported method EnumElement.NodeType should have comment or be unexported (golint)
    • Line 87: warning: exported method EnumElement.NodeValue should have comment or be unexported (golint)
    • thrifter/field.go
    • Line 16: warning: exported function NewField should have comment or be unexported (golint)
    • Line 24: warning: exported method Field.NodeType should have comment or be unexported (golint)
    • Line 28: warning: exported method Field.NodeValue should have comment or be unexported (golint)
    • thrifter/service.go
    • Line 3: warning: exported type Service should have comment or be unexported (golint)
    • Line 11: warning: exported function NewService should have comment or be unexported (golint)
    • Line 20: warning: exported method Service.NodeType should have comment or be unexported (golint)
    • Line 24: warning: exported method Service.NodeValue should have comment or be unexported (golint)
    • Line 91: warning: exported type Function should have comment or be unexported (golint)
    • Line 102: warning: exported function NewFunction should have comment or be unexported (golint)
    • Line 110: warning: exported method Function.NodeType should have comment or be unexported (golint)
    • Line 114: warning: exported method Function.NodeValue should have comment or be unexported (golint)
    • thrifter/set.go
    • Line 3: warning: exported type SetType should have comment or be unexported (golint)
    • Line 9: warning: exported function NewSetType should have comment or be unexported (golint)
    • Line 18: warning: exported method SetType.NodeType should have comment or be unexported (golint)
    • Line 22: warning: exported method SetType.NodeValue should have comment or be unexported (golint)

gocyclo90%

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!