Preparing report...

Report for github.com/tliron/py4go

A+    Excellent!    Found 12 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!


gocyclo100%

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.

No problems detected. Good job!


golint25%

Golint is a linter for Go source code.

    • py4go/module.go
    • Line 13: warning: exported var ModuleType should have comment or be unexported (golint)
    • Line 15: warning: exported function CreateModule should have comment or be unexported (golint)
    • Line 16: warning: don't use underscores in Go names; var name_ should be name (golint)
    • Line 24: 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)
    • Line 29: warning: exported function NewModuleRaw should have comment or be unexported (golint)
    • Line 30: warning: don't use underscores in Go names; var name_ should be name (golint)
    • Line 35: 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)
    • Line 40: warning: exported method Reference.GetModuleName should have comment or be unexported (golint)
    • Line 40: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 45: 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)
    • Line 50: warning: exported method Reference.EnableModule should have comment or be unexported (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 52: warning: don't use underscores in Go names; var name_ should be name (golint)
    • Line 56: warning: don't use underscores in Go names; var moduleDict_ should be moduleDict (golint)
    • Line 60: 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)
    • Line 68: warning: comment on exported method Reference.AddModuleCFunctionNoArgs should be of the form "AddModuleCFunctionNoArgs ..." (golint)
    • Line 69: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: comment on exported method Reference.AddModuleCFunctionOneArg should be of the form "AddModuleCFunctionOneArg ..." (golint)
    • Line 74: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: comment on exported method Reference.AddModuleCFunctionArgs should be of the form "AddModuleCFunctionArgs ..." (golint)
    • Line 79: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 83: warning: comment on exported method Reference.AddModuleCFunctionArgsAndKeywords should be of the form "AddModuleCFunctionArgsAndKeywords ..." (golint)
    • Line 84: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 88: warning: comment on exported method Reference.AddModuleCFunctionFastArgs should be of the form "AddModuleCFunctionFastArgs ..." (golint)
    • Line 89: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 93: warning: comment on exported method Reference.AddModuleCFunctionFastArgsAndKeywords should be of the form "AddModuleCFunctionFastArgsAndKeywords ..." (golint)
    • Line 94: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 98: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 99: warning: don't use underscores in Go names; var name_ should be name (golint)
    • Line 113: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • py4go/reference.go
    • Line 13: warning: exported type Reference should have comment or be unexported (golint)
    • Line 17: warning: exported function NewReference should have comment or be unexported (golint)
    • Line 21: warning: exported method Reference.Type should have comment or be unexported (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • py4go/type.go
    • Line 13: warning: exported type Type should have comment or be unexported (golint)
    • Line 17: warning: exported function NewType should have comment or be unexported (golint)
    • Line 21: warning: exported method Type.IsSubtype should have comment or be unexported (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 21: warning: don't use underscores in Go names; method parameter type_ should be type (golint)
    • Line 25: warning: exported method Type.HasFlag should have comment or be unexported (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • py4go/concurrency.go
    • Line 16: warning: exported type ThreadState should have comment or be unexported (golint)
    • Line 20: warning: exported function SaveThreadState should have comment or be unexported (golint)
    • Line 24: warning: exported method ThreadState.Restore should have comment or be unexported (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 32: warning: exported type GilState should have comment or be unexported (golint)
    • Line 36: warning: exported function EnsureGilState should have comment or be unexported (golint)
    • Line 40: warning: exported method GilState.Release should have comment or be unexported (golint)
    • Line 40: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • py4go/examples/hello-world/api/module.go
    • Line 24: warning: exported function CreateModule should have comment or be unexported (golint)
    • Line 42: 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)
    • py4go/exception.go
    • Line 16: warning: exported function HasException should have comment or be unexported (golint)
    • Line 20: warning: exported function GetError should have comment or be unexported (golint)
    • Line 23: 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)
    • Line 32: warning: exported type Exception should have comment or be unexported (golint)
    • Line 38: warning: exported function FetchException should have comment or be unexported (golint)
    • Line 39: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 44: warning: don't use underscores in Go names; var type__ should be type (golint)
    • Line 44: warning: don't use underscores in Go names; var value_ should be value (golint)
    • Line 44: warning: don't use underscores in Go names; var traceback_ should be traceback (golint)
    • Line 59: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 64: warning: exported function NewExceptionRaw should have comment or be unexported (golint)
    • Line 64: warning: don't use underscores in Go names; func parameter type_ should be type (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • py4go/general.go
    • Line 12: warning: exported function Initialize should have comment or be unexported (golint)
    • Line 16: warning: exported function Finalize should have comment or be unexported (golint)
    • Line 19: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 24: warning: exported function Version should have comment or be unexported (golint)
    • py4go/import.go
    • Line 16: warning: exported function Import should have comment or be unexported (golint)
    • Line 17: warning: don't use underscores in Go names; var name_ should be name (golint)
    • Line 20: warning: don't use underscores in Go names; var import_ should be import (golint)
    • Line 22: 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)
    • py4go/object.go
    • Line 17: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 21: warning: don't use underscores in Go names; var string_ should be string (golint)
    • Line 23: 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)
    • Line 34: warning: exported method Reference.Acquire should have comment or be unexported (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 38: warning: exported method Reference.Release should have comment or be unexported (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 42: warning: exported method Reference.Str should have comment or be unexported (golint)
    • Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 45: 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)
    • Line 50: warning: exported method Reference.GetAttr should have comment or be unexported (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 51: warning: don't use underscores in Go names; var name_ should be name (golint)
    • Line 56: 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)
    • Line 61: warning: exported method Reference.SetAttr should have comment or be unexported (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 62: warning: don't use underscores in Go names; var name_ should be name (golint)
    • Line 67: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 72: warning: exported method Reference.Call should have comment or be unexported (golint)
    • Line 72: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: don't use underscores in Go names; var args_ should be args (golint)
    • Line 76: 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)
    • Line 84: warning: exported method Reference.CallRaw should have comment or be unexported (golint)
    • Line 84: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 87: 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)
    • py4go/path.go
    • Line 8: warning: exported const PYTHONPATH should have comment or be unexported (golint)
    • Line 10: warning: exported function SetPythonPath should have comment or be unexported (golint)
    • Line 11: warning: don't use underscores in Go names; var path_ should be path (golint)
    • Line 15: warning: exported function AppendPythonPath should have comment or be unexported (golint)
    • Line 16: warning: don't use underscores in Go names; var path_ should be path (golint)
    • Line 18: warning: don't use underscores in Go names; var path__ should be path (golint)
    • Line 22: warning: exported function PrependPythonPath should have comment or be unexported (golint)
    • Line 23: warning: don't use underscores in Go names; var path_ should be path (golint)
    • Line 25: warning: don't use underscores in Go names; var path__ should be path (golint)
    • py4go/primitive.go
    • Line 17: warning: exported function NewPrimitiveReference should have comment or be unexported (golint)
    • Line 22: warning: don't use underscores in Go names; var value_ should be value (golint)
    • Line 28: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 58: warning: exported var None should have comment or be unexported (golint)
    • Line 64: warning: exported var BoolType should have comment or be unexported (golint)
    • Line 66: warning: exported var True should have comment or be unexported (golint)
    • Line 67: warning: exported var False should have comment or be unexported (golint)
    • Line 69: warning: exported method Reference.IsBool should have comment or be unexported (golint)
    • Line 69: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: exported method Reference.ToBool should have comment or be unexported (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 87: warning: exported var LongType should have comment or be unexported (golint)
    • Line 89: warning: exported function NewLong should have comment or be unexported (golint)
    • Line 92: 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)
    • Line 97: warning: exported method Reference.IsLong should have comment or be unexported (golint)
    • Line 97: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 102: warning: exported method Reference.ToInt64 should have comment or be unexported (golint)
    • Line 102: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 105: 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)
    • Line 114: warning: exported var FloatType should have comment or be unexported (golint)
    • Line 116: warning: exported function NewFloat should have comment or be unexported (golint)
    • Line 119: 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)
    • Line 124: warning: exported method Reference.IsFloat should have comment or be unexported (golint)
    • Line 124: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 128: warning: exported method Reference.ToFloat64 should have comment or be unexported (golint)
    • Line 128: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 131: 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)
    • Line 140: warning: exported var UnicodeType should have comment or be unexported (golint)
    • Line 142: warning: exported function NewUnicode should have comment or be unexported (golint)
    • Line 143: warning: don't use underscores in Go names; var value_ should be value (golint)
    • Line 148: 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)
    • Line 153: warning: exported method Reference.IsUnicode should have comment or be unexported (golint)
    • Line 153: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 158: warning: exported method Reference.ToString should have comment or be unexported (golint)
    • Line 158: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 164: 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)
    • Line 176: warning: exported var TupleType should have comment or be unexported (golint)
    • Line 178: warning: exported function NewTuple should have comment or be unexported (golint)
    • Line 181: warning: don't use underscores in Go names; var item_ should be item (golint)
    • Line 190: 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)
    • Line 195: warning: exported function NewTupleRaw should have comment or be unexported (golint)
    • Line 198: 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)
    • Line 203: warning: exported method Reference.IsTuple should have comment or be unexported (golint)
    • Line 203: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 208: warning: exported method Reference.SetTupleItem should have comment or be unexported (golint)
    • Line 208: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 211: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 220: warning: exported var ListType should have comment or be unexported (golint)
    • Line 222: warning: exported function NewList should have comment or be unexported (golint)
    • Line 225: warning: don't use underscores in Go names; var item_ should be item (golint)
    • Line 234: 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)
    • Line 239: warning: exported function NewListRaw should have comment or be unexported (golint)
    • Line 242: 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)
    • Line 247: warning: exported method Reference.IsList should have comment or be unexported (golint)
    • Line 247: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 252: warning: exported method Reference.SetListItem should have comment or be unexported (golint)
    • Line 252: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 255: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 264: warning: exported var DictType should have comment or be unexported (golint)
    • Line 266: warning: exported function NewDict should have comment or be unexported (golint)
    • Line 269: 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)
    • Line 274: warning: exported method Reference.IsDict should have comment or be unexported (golint)
    • Line 274: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 279: warning: exported method Reference.SetDictItem should have comment or be unexported (golint)
    • Line 279: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 282: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 291: warning: exported var SetType should have comment or be unexported (golint)
    • Line 293: warning: exported function NewSet should have comment or be unexported (golint)
    • Line 296: 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)
    • Line 301: warning: exported method Reference.IsSet should have comment or be unexported (golint)
    • Line 301: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 309: warning: exported var FrozenSetType should have comment or be unexported (golint)
    • Line 311: warning: exported function NewFrozenSet should have comment or be unexported (golint)
    • Line 314: 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)
    • Line 319: warning: exported method Reference.IsFrozenSet should have comment or be unexported (golint)
    • Line 319: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 327: warning: exported var BytesType should have comment or be unexported (golint)
    • Line 329: warning: exported function NewBytes should have comment or be unexported (golint)
    • Line 331: warning: don't use underscores in Go names; var value_ should be value (golint)
    • Line 336: 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)
    • Line 341: warning: exported method Reference.IsBytes should have comment or be unexported (golint)
    • Line 341: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 346: warning: exported method Reference.ToBytes should have comment or be unexported (golint)
    • Line 346: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 349: 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)
    • Line 354: warning: exported method Reference.AccessBytes should have comment or be unexported (golint)
    • Line 354: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 355: warning: don't use underscores in Go names; var string_ should be string (golint)
    • Line 358: 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)
    • Line 367: warning: exported var ByteArrayType should have comment or be unexported (golint)
    • Line 369: warning: exported function NewByteArray should have comment or be unexported (golint)
    • Line 371: warning: don't use underscores in Go names; var value_ should be value (golint)
    • Line 376: 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)
    • Line 381: warning: exported method Reference.IsByteArray should have comment or be unexported (golint)
    • Line 381: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 385: warning: exported method Reference.ByteArrayToBytes should have comment or be unexported (golint)
    • Line 385: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 388: 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)
    • Line 393: warning: exported method Reference.AccessByteArray should have comment or be unexported (golint)
    • Line 393: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 394: warning: don't use underscores in Go names; var string_ should be string (golint)
    • Line 397: 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)

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!