Preparing report...

Report for github.com/harwoeck/magic

A+    Excellent!    Found 8 issues across 15 files

Tweet

gofmt93%

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!


gocyclo86%

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.

    • magic/magic.go
    • Line 37: warning: cyclomatic complexity 17 of function NewManagedLevelIterator() is high (> 15) (gocyclo)

golint60%

Golint is a linter for Go source code.

    • magic/magic.go
    • Line 37: warning: exported function NewManagedLevelIterator should have comment or be unexported (golint)
    • magic/read.go
    • Line 38: warning: exported method Manager.ReadMatrix should have comment or be unexported (golint)
    • magic/srcprovider.go
    • Line 10: warning: exported function FromString should have comment or be unexported (golint)
    • Line 14: warning: exported function FromFile should have comment or be unexported (golint)
    • magic/write.go
    • Line 20: warning: exported method Manager.Writef should have comment or be unexported (golint)
    • Line 24: warning: exported method Manager.WriteBool should have comment or be unexported (golint)
    • Line 28: warning: exported method Manager.WriteInt8 should have comment or be unexported (golint)
    • Line 32: warning: exported method Manager.WriteInt16 should have comment or be unexported (golint)
    • Line 36: warning: exported method Manager.WriteInt32 should have comment or be unexported (golint)
    • Line 40: warning: exported method Manager.WriteInt64 should have comment or be unexported (golint)
    • Line 44: warning: exported method Manager.WriteInt should have comment or be unexported (golint)
    • Line 48: warning: exported method Manager.WriteByte should have comment or be unexported (golint)
    • Line 52: warning: exported method Manager.WriteUint8 should have comment or be unexported (golint)
    • Line 56: warning: exported method Manager.WriteUint16 should have comment or be unexported (golint)
    • Line 60: warning: exported method Manager.WriteUint32 should have comment or be unexported (golint)
    • Line 64: warning: exported method Manager.WriteUint64 should have comment or be unexported (golint)
    • Line 68: warning: exported method Manager.WriteUint should have comment or be unexported (golint)
    • Line 72: warning: exported method Manager.WriteFloat32 should have comment or be unexported (golint)
    • Line 76: warning: exported method Manager.WriteFloat64 should have comment or be unexported (golint)
    • Line 80: warning: exported method Manager.WriteString 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!