Preparing report...

Report for github.com/zerjioang/go-fsm

A+    Excellent!    Found 4 issues across 5 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!


golint40%

Golint is a linter for Go source code.

    • go-fsm/fsm.go
    • Line 21: warning: exported type FiniteStateMachine should have comment or be unexported (golint)
    • Line 28: warning: exported method FiniteStateMachine.AddState should have comment or be unexported (golint)
    • Line 33: warning: exported method FiniteStateMachine.DeleteState should have comment or be unexported (golint)
    • Line 43: warning: comment on exported method FiniteStateMachine.AddTransaction should be of the form "AddTransaction ..." (golint)
    • Line 50: warning: comment on exported method FiniteStateMachine.DeleteTransaction should be of the form "DeleteTransaction ..." (golint)
    • Line 55: warning: exported method FiniteStateMachine.SetInitialState should have comment or be unexported (golint)
    • Line 74: warning: exported method FiniteStateMachine.SetFinalState should have comment or be unexported (golint)
    • Line 84: warning: comment on exported method FiniteStateMachine.ChangeStateTo should be of the form "ChangeStateTo ..." (golint)
    • Line 109: warning: exported method FiniteStateMachine.HasValidTransaction should have comment or be unexported (golint)
    • Line 116: warning: comment on exported method FiniteStateMachine.DotGraph should be of the form "DotGraph ..." (golint)
    • Line 145: warning: comment on exported method FiniteStateMachine.Json should be of the form "Json ..." (golint)
    • Line 161: warning: comment on exported method FiniteStateMachine.Load should be of the form "Load ..." (golint)
    • Line 173: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 187: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 195: warning: comment on exported function NewPtr should be of the form "NewPtr ..." (golint)
    • go-fsm/state.go
    • Line 3: warning: exported type StateType should have comment or be unexported (golint)
    • Line 6: warning: exported const StartState should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported type StateEvents should have comment or be unexported (golint)
    • Line 31: warning: exported var NoStateEvents should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign80%

IneffAssign detects ineffectual assignments in Go code.


misspell80%

Misspell Finds commonly misspelled English words

    • go-fsm/fsm.go
    • Line 43: warning: "specifing" is a misspelling of "specifying" (misspell)
    • Line 50: warning: "specifing" is a misspelling of "specifying" (misspell)