Preparing report...

Report for github.com/buger/gor

A+    Excellent!    Found 17 issues across 72 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!


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.

    • gor/capture/capture.go
    • Line 210: warning: cyclomatic complexity 21 of function (*Listener).PcapHandle() is high (> 15) (gocyclo)
    • Line 303: warning: cyclomatic complexity 19 of function (*Listener).read() is high (> 15) (gocyclo)
    • gor/emitter.go
    • Line 76: warning: cyclomatic complexity 28 of function CopyMulty() is high (> 15) (gocyclo)
    • gor/plugins.go
    • Line 90: warning: cyclomatic complexity 20 of function NewPlugins() is high (> 15) (gocyclo)

golint87%

Golint is a linter for Go source code.

    • gor/tcp/tcp_message.go
    • Line 100: warning: exported method Message.MissingChunk should have comment or be unexported (golint)
    • Line 114: warning: exported method Message.PacketData should have comment or be unexported (golint)
    • Line 159: warning: exported method Message.Finalize should have comment or be unexported (golint)
    • Line 218: warning: comment on exported method MessageParser.PacketHandler should be of the form "PacketHandler ..." (golint)
    • Line 298: warning: exported method MessageParser.Emit should have comment or be unexported (golint)
    • Line 312: warning: comment on exported method MessageParser.Debug should be of the form "Debug ..." (golint)
    • Line 319: warning: exported method MessageParser.Close should have comment or be unexported (golint)
    • gor/elasticsearch.go
    • Line 15: warning: exported type ESUriErorr should have comment or be unexported (golint)
    • Line 21: warning: exported type ESPlugin should have comment or be unexported (golint)
    • Line 31: warning: exported type ESRequestResponse should have comment or be unexported (golint)
    • Line 63: warning: error should be the last type when returning multiple items (golint)
    • Line 85: warning: exported method ESPlugin.Init should have comment or be unexported (golint)
    • Line 108: warning: exported method ESPlugin.IndexerShutdown should have comment or be unexported (golint)
    • Line 113: warning: exported method ESPlugin.ErrorHandler should have comment or be unexported (golint)
    • Line 120: warning: exported method ESPlugin.RttDurationToMs should have comment or be unexported (golint)
    • gor/gor_stat.go
    • Line 9: warning: exported type GorStat should have comment or be unexported (golint)
    • Line 18: warning: exported function NewGorStat should have comment or be unexported (golint)
    • Line 46: warning: exported method GorStat.Reset should have comment or be unexported (golint)
    • gor/http_modifier.go
    • Line 12: warning: exported type HTTPModifier should have comment or be unexported (golint)
    • Line 16: warning: exported function NewHTTPModifier should have comment or be unexported (golint)
    • Line 36: warning: exported method HTTPModifier.Rewrite should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.

    • gor/capture/packet_test.go
    • Line 61: warning: undeclared name: Packet (ineffassign)
    • Line 175: warning: undeclared name: Packet (ineffassign)
    • Line 62: warning: undeclared name: Packet (ineffassign)
    • Line 72: warning: undeclared name: NewPacket (ineffassign)
    • Line 83: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 84: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 87: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 88: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 91: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 92: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 95: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 96: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 99: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 100: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 104: warning: undeclared name: ErrHdrInvalid (ineffassign)
    • Line 105: warning: undeclared name: ErrHdrInvalid (ineffassign)
    • Line 109: warning: undeclared name: ErrHdrMissing (ineffassign)
    • Line 110: warning: undeclared name: ErrHdrMissing (ineffassign)
    • Line 114: warning: undeclared name: ErrHdrExpected (ineffassign)
    • Line 115: warning: undeclared name: ErrHdrExpected (ineffassign)
    • Line 120: warning: undeclared name: ErrHdrInvalid (ineffassign)
    • Line 121: warning: undeclared name: ErrHdrInvalid (ineffassign)
    • Line 125: warning: undeclared name: ErrHdrExpected (ineffassign)
    • Line 126: warning: undeclared name: ErrHdrExpected (ineffassign)
    • Line 137: warning: undeclared name: ErrHdrMissing (ineffassign)
    • Line 138: warning: undeclared name: ErrHdrMissing (ineffassign)
    • Line 141: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 142: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 145: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 146: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 149: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 150: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 153: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 154: warning: undeclared name: ErrHdrLength (ineffassign)
    • Line 158: warning: undeclared name: ErrHdrInvalid (ineffassign)
    • Line 159: warning: undeclared name: ErrHdrInvalid (ineffassign)
    • Line 163: warning: undeclared name: ErrHdrMissing (ineffassign)
    • Line 164: warning: undeclared name: ErrHdrMissing (ineffassign)
    • Line 168: warning: undeclared name: ErrHdrExpected (ineffassign)
    • Line 169: warning: undeclared name: ErrHdrExpected (ineffassign)
    • Line 176: warning: undeclared name: NewPacket (ineffassign)
    • gor/capture/capture_test.go
    • Line 68: warning: undeclared name: PcapDumpHandler (ineffassign)
    • Line 96: warning: undeclared name: Packet (ineffassign)
    • Line 164: warning: undeclared name: PcapDumpHandler (ineffassign)
    • Line 180: warning: undeclared name: PcapDumpHandler (ineffassign)
    • Line 203: warning: undeclared name: Packet (ineffassign)
    • Line 224: warning: undeclared name: Packet (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!