Preparing report...

Report for github.com/gogap/factory

A    Great!    Found 8 issues across 9 files

Tweet

gofmt88%

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!


gocyclo88%

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.


golint11%

Golint is a linter for Go source code.

    • factory/options.go
    • Line 9: warning: exported type Options should have comment or be unexported (golint)
    • Line 11: warning: exported method Options.Get should have comment or be unexported (golint)
    • Line 28: warning: exported method Options.ToObject should have comment or be unexported (golint)
    • factory/example/car/main.go
    • Line 9: warning: exported type Hub should have comment or be unexported (golint)
    • Line 13: warning: exported function NewHub should have comment or be unexported (golint)
    • Line 20: warning: exported type Wheel should have comment or be unexported (golint)
    • Line 26: warning: exported function NewWheel should have comment or be unexported (golint)
    • Line 33: warning: exported method Wheel.Run should have comment or be unexported (golint)
    • Line 37: warning: exported type Car should have comment or be unexported (golint)
    • Line 46: warning: exported method Car.Run should have comment or be unexported (golint)
    • Line 55: warning: exported function NewCar should have comment or be unexported (golint)
    • factory/classic_factory.go
    • Line 11: warning: exported type ClassicFactory should have comment or be unexported (golint)
    • Line 21: warning: exported function NewClassicFactory should have comment or be unexported (golint)
    • Line 34: warning: exported method ClassicFactory.ContainsObject should have comment or be unexported (golint)
    • Line 43: warning: exported method ClassicFactory.GetAliases should have comment or be unexported (golint)
    • Line 58: warning: exported method ClassicFactory.GetObject should have comment or be unexported (golint)
    • Line 77: warning: exported method ClassicFactory.GetType should have comment or be unexported (golint)
    • Line 89: warning: exported method ClassicFactory.IsPrototype should have comment or be unexported (golint)
    • Line 100: warning: exported method ClassicFactory.IsSingleton should have comment or be unexported (golint)
    • Line 110: warning: exported method ClassicFactory.IsTypeMatch should have comment or be unexported (golint)
    • Line 134: warning: exported method ClassicFactory.Define should have comment or be unexported (golint)
    • factory/errors.go
    • Line 8: warning: exported const ErrNamespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported var ErrEmptyObjectDefinitionName should have comment or be unexported (golint)
    • factory/model_provider.go
    • Line 12: warning: exported type ModelProvider should have comment or be unexported (golint)
    • Line 17: warning: exported type ClassicModelProvider should have comment or be unexported (golint)
    • Line 24: warning: exported function NewClassicModelProvider should have comment or be unexported (golint)
    • Line 31: warning: exported function RegisterModel should have comment or be unexported (golint)
    • Line 38: warning: exported method ClassicModelProvider.Register should have comment or be unexported (golint)
    • Line 76: warning: exported method ClassicModelProvider.Get should have comment or be unexported (golint)
    • factory/object_defintion.go
    • Line 9: warning: exported type Scope should have comment or be unexported (golint)
    • Line 12: warning: exported const Singleton should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type NewObjectFunc should have comment or be unexported (golint)
    • Line 18: warning: exported type DefinitionOption should have comment or be unexported (golint)
    • Line 22: warning: exported type ObjectDefinition should have comment or be unexported (golint)
    • Line 36: warning: exported method ObjectDefinition.Name should have comment or be unexported (golint)
    • Line 44: warning: exported method ObjectDefinition.Scope should have comment or be unexported (golint)
    • Line 48: warning: exported method ObjectDefinition.IsTypeMatch should have comment or be unexported (golint)
    • Line 56: warning: exported method ObjectDefinition.NewObjectFunc should have comment or be unexported (golint)
    • Line 60: warning: exported method ObjectDefinition.InitialFuncName should have comment or be unexported (golint)
    • Line 64: warning: exported method ObjectDefinition.Aliases should have comment or be unexported (golint)
    • Line 68: warning: exported method ObjectDefinition.Type should have comment or be unexported (golint)
    • Line 85: warning: exported function DefOptOfNewObjectFunc should have comment or be unexported (golint)
    • Line 92: warning: exported function DefOptOfObjectRef should have comment or be unexported (golint)
    • Line 164: warning: exported function DefOptOfInitialFunc should have comment or be unexported (golint)
    • Line 171: warning: exported function DefOptOfRefOrder should have comment or be unexported (golint)
    • Line 203: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • factory/object_instance.go
    • Line 7: warning: exported type ObjectInstance should have comment or be unexported (golint)
    • Line 18: warning: exported method ObjectInstance.Id should have comment or be unexported (golint)
    • Line 22: warning: exported method ObjectInstance.Instance should have comment or be unexported (golint)
    • Line 26: warning: exported method ObjectInstance.Options should have comment or be unexported (golint)
    • Line 30: warning: exported method ObjectInstance.Definition 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!