Preparing report...

Report for github.com/codeamp/transistor

A    Great!    Found 9 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!


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!


golint11%

Golint is a linter for Go source code.

    • transistor/example/plugins/examplePlugin1.go
    • Line 8: warning: exported type ExamplePlugin1 should have comment or be unexported (golint)
    • Line 19: warning: exported method ExamplePlugin1.Start should have comment or be unexported (golint)
    • Line 31: warning: exported method ExamplePlugin1.Stop should have comment or be unexported (golint)
    • Line 35: warning: exported method ExamplePlugin1.Subscribe should have comment or be unexported (golint)
    • Line 41: warning: exported method ExamplePlugin1.Process should have comment or be unexported (golint)
    • transistor/example/plugins/examplePlugin2.go
    • Line 8: warning: exported type ExamplePlugin2 should have comment or be unexported (golint)
    • Line 19: warning: exported method ExamplePlugin2.Start should have comment or be unexported (golint)
    • Line 32: warning: exported method ExamplePlugin2.Stop should have comment or be unexported (golint)
    • Line 36: warning: exported method ExamplePlugin2.Subscribe should have comment or be unexported (golint)
    • Line 42: warning: exported method ExamplePlugin2.Process should have comment or be unexported (golint)
    • transistor/event.go
    • Line 18: warning: exported type Action should have comment or be unexported (golint)
    • Line 19: warning: exported type State should have comment or be unexported (golint)
    • Line 20: warning: exported type EventName should have comment or be unexported (golint)
    • Line 22: warning: exported function GetAction should have comment or be unexported (golint)
    • Line 47: warning: exported function GetState should have comment or be unexported (golint)
    • Line 73: warning: exported type Event should have comment or be unexported (golint)
    • Line 89: warning: exported type Caller should have comment or be unexported (golint)
    • Line 94: warning: exported type Artifact should have comment or be unexported (golint)
    • Line 105: warning: exported method Artifact.Int should have comment or be unexported (golint)
    • Line 114: warning: exported method Artifact.StringMap should have comment or be unexported (golint)
    • Line 118: warning: exported method Artifact.StringSlice should have comment or be unexported (golint)
    • Line 122: warning: exported function CreateEvent should have comment or be unexported (golint)
    • Line 126: warning: exported function UpdateEvent should have comment or be unexported (golint)
    • Line 130: warning: exported function DeleteEvent should have comment or be unexported (golint)
    • Line 134: warning: exported function NewEvent should have comment or be unexported (golint)
    • Line 149: warning: exported method Event.CreateEvent should have comment or be unexported (golint)
    • Line 153: warning: exported method Event.UpdateEvent should have comment or be unexported (golint)
    • Line 156: warning: exported method Event.DeleteEvent should have comment or be unexported (golint)
    • Line 160: warning: exported method Event.StatusEvent should have comment or be unexported (golint)
    • Line 164: warning: exported method Event.NewEvent should have comment or be unexported (golint)
    • Line 174: warning: exported method Event.SetPayload should have comment or be unexported (golint)
    • Line 192: warning: exported method Event.Dump should have comment or be unexported (golint)
    • Line 197: warning: exported method Event.Event should have comment or be unexported (golint)
    • Line 201: warning: exported method Event.Matches should have comment or be unexported (golint)
    • Line 227: warning: exported method Event.AddArtifact should have comment or be unexported (golint)
    • Line 247: warning: exported method Event.GetArtifact should have comment or be unexported (golint)
    • Line 254: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 257: warning: exported method Event.GetArtifactFromSource should have comment or be unexported (golint)
    • Line 264: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • transistor/plugin.go
    • Line 5: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 19: warning: exported type RunningPlugin should have comment or be unexported (golint)
    • transistor/registry.go
    • Line 5: warning: exported type Creator should have comment or be unexported (golint)
    • Line 7: warning: exported var PluginRegistry should have comment or be unexported (golint)
    • Line 8: warning: exported var EventRegistry should have comment or be unexported (golint)
    • Line 10: warning: exported function RegisterPlugin should have comment or be unexported (golint)
    • transistor/transistor.go
    • Line 26: warning: exported type Config should have comment or be unexported (golint)
    • Line 78: warning: exported method Transistor.LoadPlugins should have comment or be unexported (golint)
    • Line 94: warning: comment on exported method Transistor.PluginNames should be of the form "PluginNames ..." (golint)
    • Line 97: warning: should omit 2nd value from range; this loop is equivalent to `for key := range ...` (golint)
    • Line 184: warning: don't use underscores in Go names; var ev_handled should be evHandled (golint)
    • Line 299: warning: comment on exported method Transistor.Stop should be of the form "Stop ..." (golint)
    • Line 309: warning: exported method Transistor.GetTestEvent should have comment or be unexported (golint)
    • transistor/utils.go
    • Line 14: warning: exported function RandomString should have comment or be unexported (golint)
    • Line 24: warning: exported function SliceContains should have comment or be unexported (golint)
    • Line 52: warning: exported function MapPayload should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign44%

IneffAssign detects ineffectual assignments in Go code.

    • transistor/example/plugins/examplePlugin1.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/codeamp/logger (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/codeamp/transistor (invalid package name: "") (ineffassign)
    • transistor/example/main.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/codeamp/logger (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/codeamp/transistor (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/codeamp/transistor/example/plugins (invalid package name: "") (ineffassign)
    • Line 37: warning: undeclared name: log (ineffassign)
    • Line 45: warning: undeclared name: log (ineffassign)
    • Line 53: warning: undeclared name: log (ineffassign)
    • Line 53: warning: undeclared name: log (ineffassign)
    • Line 9: warning: "github.com/codeamp/logger" imported but not used (ineffassign)
    • transistor/event.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: could not import github.com/bww/go-json (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/codeamp/logger (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/satori/go.uuid (invalid package name: "") (ineffassign)
    • transistor/plugin.go
    • Line 3: warning: cannot find package "." in: (ineffassign)
    • Line 3: warning: could not import github.com/jrallison/go-workers (invalid package name: "") (ineffassign)
    • transistor/transistor.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)

misspell88%

Misspell Finds commonly misspelled English words