Preparing report...

Report for github.com/CodeFreezr/phrasebook

D    Needs lots of improvement    Found 92 issues across 92 files

Tweet

gofmt6%

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!


golint98%

Golint is a linter for Go source code.

    • phrasebook/examples/pkg/src/eg/types.go
    • Line 3: warning: comment on exported type Example should be of the form "Example ..." (with optional leading article) (golint)
    • Line 11: warning: comment on exported function NewExample should be of the form "NewExample ..." (golint)

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!


license0%

Checks whether your project has a LICENSE file.


ineffassign4%

IneffAssign detects ineffectual assignments in Go code.

    • phrasebook/examples/mapReduce.go
    • Line 12: warning: Result redeclared in this block (ineffassign)
    • Line 69: warning: main redeclared in this block (ineffassign)
    • Line 36: warning: cannot use token (variable of type string) as int value in struct literal (ineffassign)
    • Line 36: warning: too many values in struct literal (ineffassign)
    • Line 64: warning: r.counts undefined (type Result has no field or method counts) (ineffassign)
    • Line 64: warning: r.token undefined (type Result has no field or method token) (ineffassign)
    • phrasebook/examples/transactionMap.go
    • Line 24: warning: set redeclared in this block (ineffassign)
    • Line 53: warning: runMap redeclared in this block (ineffassign)
    • Line 58: warning: main redeclared in this block (ineffassign)
    • Line 60: warning: cannot use m (variable of type chan Request) as chan request value in argument to runMap (ineffassign)
    • phrasebook/examples/specializedStack.go
    • Line 4: warning: stackEntry redeclared in this block (ineffassign)
    • Line 26: warning: stack redeclared in this block (ineffassign)
    • Line 68: warning: main redeclared in this block (ineffassign)
    • Line 45: warning: method Push already declared for type stack struct{top *stackEntry} (ineffassign)
    • Line 58: warning: method Pop already declared for type stack struct{top *stackEntry} (ineffassign)
    • Line 22: warning: cannot use i (variable of type *integerStackEntry) as stackEntry value in return statement (ineffassign)
    • Line 32: warning: s.isInteger undefined (type *stack has no field or method isInteger) (ineffassign)
    • Line 33: warning: invalid operation: s.top (variable of type *stackEntry) is not an interface (ineffassign)
    • Line 41: warning: cannot use s.top (variable of type *stackEntry) as stackEntry value in assignment (ineffassign)
    • Line 42: warning: cannot use &e (value of type *integerStackEntry) as *stackEntry value in assignment (ineffassign)
    • Line 43: warning: s.isInteger undefined (type *stack has no field or method isInteger) (ineffassign)
    • Line 52: warning: cannot use s.top (variable of type *stackEntry) as stackEntry value in assignment (ineffassign)
    • Line 53: warning: cannot use &e (value of type *genericStackEntry) as *stackEntry value in assignment (ineffassign)
    • Line 54: warning: s.isInteger undefined (type *stack has no field or method isInteger) (ineffassign)
    • Line 62: warning: s.top.pop undefined (type *stackEntry has no field or method pop) (ineffassign)
    • Line 63: warning: s.isInteger undefined (type *stack has no field or method isInteger) (ineffassign)
    • phrasebook/examples/array.go
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 3: warning: other declaration of main (ineffassign)
    • Line 4: warning: a1 declared but not used (ineffassign)
    • Line 5: warning: matrix declared but not used (ineffassign)
    • Line 6: warning: a2 declared but not used (ineffassign)
    • phrasebook/examples/slice.go
    • Line 3: warning: main redeclared in this block (ineffassign)
    • Line 5: warning: firstHalf declared but not used (ineffassign)
    • Line 6: warning: secondHalf declared but not used (ineffassign)
    • Line 7: warning: middle declared but not used (ineffassign)
    • Line 8: warning: all declared but not used (ineffassign)
    • phrasebook/examples/finalize.go
    • Line 5: warning: example redeclared in this block (ineffassign)
    • Line 16: warning: main redeclared in this block (ineffassign)
    • Line 9: warning: e.Str undefined (type *example has no field or method Str) (ineffassign)
    • Line 18: warning: e.Str undefined (type *example has no field or method Str) (ineffassign)
    • phrasebook/examples/iota.go
    • Line 4: warning: main redeclared in this block (ineffassign)
    • Line 6: warning: cannot use iota outside constant declaration (ineffassign)
    • Line 6: warning: cannot use iota outside constant declaration (ineffassign)
    • Line 7: warning: cannot use iota outside constant declaration (ineffassign)
    • Line 7: warning: cannot use iota outside constant declaration (ineffassign)
    • phrasebook/examples/methods.go
    • Line 4: warning: Example redeclared in this block (ineffassign)
    • Line 21: warning: main redeclared in this block (ineffassign)
    • Line 13: warning: other declaration of Log (ineffassign)
    • Line 14: warning: e.count undefined (type *Example has no field or method count) (ineffassign)
    • Line 15: warning: e.count undefined (type *Example has no field or method count) (ineffassign)
    • Line 15: warning: e.Val undefined (type *Example has no field or method Val) (ineffassign)
    • phrasebook/examples/struct.go
    • Line 4: warning: Example redeclared in this block (ineffassign)
    • Line 13: warning: main redeclared in this block (ineffassign)
    • Line 8: warning: method Log already declared for type Example struct{A int; B string; C e} (ineffassign)
    • Line 9: warning: e.count undefined (type *Example has no field or method count) (ineffassign)
    • Line 10: warning: e.count undefined (type *Example has no field or method count) (ineffassign)
    • Line 10: warning: e.Val undefined (type *Example has no field or method Val) (ineffassign)
    • Line 15: warning: e.Val undefined (type Example has no field or method Val) (ineffassign)
    • phrasebook/examples/client.go
    • Line 8: warning: main redeclared in this block (ineffassign)
    • Line 6: warning: other declaration of Result (ineffassign)
    • Line 5: warning: other declaration of Arg (ineffassign)
    • Line 6: warning: other declaration of Result (ineffassign)
    • phrasebook/examples/webServer.go
    • Line 5: warning: webCounter redeclared in this block (ineffassign)
    • Line 8: warning: NewCounter redeclared in this block (ineffassign)
    • Line 23: warning: main redeclared in this block (ineffassign)
    • Line 16: warning: method ServeHTTP already declared for type webCounter struct{count chan int; template *template.Template} (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!