Preparing report...

Report for github.com/Azure/go-amqp

A+    Excellent!    Found 14 issues across 31 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!


golint74%

Golint is a linter for Go source code.

    • go-amqp/buffer.go
    • Line 53: warning: don't use underscores in Go names; var byte_ should be byte (golint)
    • Line 124: warning: don't use underscores in Go names; method parameter byte_ should be byte (golint)
    • go-amqp/decode.go
    • Line 302: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 356: warning: don't use underscores in Go names; func parameter type_ should be type (golint)
    • Line 420: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 443: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 485: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 524: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 555: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 596: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 943: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 958: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 997: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1015: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1033: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1047: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1061: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1074: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1087: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1106: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1125: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1139: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1153: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1172: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1199: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 1218: warning: don't use underscores in Go names; var type_ should be type (golint)
    • go-amqp/encode.go
    • Line 554: warning: don't use underscores in Go names; func parameter type_ should be type (golint)
    • Line 573: warning: don't use underscores in Go names; func parameter type_ should be type (golint)
    • go-amqp/marshal_test.go
    • Line 146: warning: don't use underscores in Go names; range var type_ should be type (golint)
    • Line 172: warning: don't use underscores in Go names; range var type_ should be type (golint)
    • Line 234: warning: don't use underscores in Go names; range var type_ should be type (golint)
    • go-amqp/sasl.go
    • Line 193: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-amqp/types.go
    • Line 158: warning: don't use underscores in Go names; struct field type_ should be type (golint)
    • Line 1961: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3067: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3104: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3152: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3203: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3272: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3365: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3449: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3542: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3608: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3660: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3723: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3812: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3903: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 3993: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 4054: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 4106: warning: don't use underscores in Go names; var type_ should be type (golint)
    • Line 4208: warning: don't use underscores in Go names; var type_ should be type (golint)
    • go-amqp/internal/testconn/recorder.go
    • Line 8: warning: exported type Recorder should have comment or be unexported (golint)
    • Line 13: warning: exported function NewRecorder should have comment or be unexported (golint)
    • Line 27: warning: exported method Recorder.Close should have comment or be unexported (golint)
    • go-amqp/internal/testconn/testconn.go
    • Line 10: warning: exported function New should have comment or be unexported (golint)
    • Line 19: warning: exported type Conn should have comment or be unexported (golint)
    • Line 46: warning: exported method Conn.Close should have comment or be unexported (golint)
    • Line 51: warning: exported method Conn.LocalAddr should have comment or be unexported (golint)
    • Line 58: warning: exported method Conn.RemoteAddr should have comment or be unexported (golint)
    • Line 65: warning: exported method Conn.SetDeadline should have comment or be unexported (golint)
    • Line 69: warning: exported method Conn.SetReadDeadline should have comment or be unexported (golint)
    • Line 86: warning: exported method Conn.SetWriteDeadline should have comment or be unexported (golint)

gocyclo74%

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.

    • go-amqp/receiver.go
    • Line 145: warning: cyclomatic complexity 16 of function (*Receiver).dispositionBatcher() is high (> 15) (gocyclo)
    • go-amqp/encode.go
    • Line 43: warning: cyclomatic complexity 78 of function marshal() is high (> 15) (gocyclo)
    • Line 432: warning: cyclomatic complexity 33 of function writeMap() is high (> 15) (gocyclo)
    • go-amqp/decode.go
    • Line 155: warning: cyclomatic complexity 69 of function unmarshal() is high (> 15) (gocyclo)
    • Line 591: warning: cyclomatic complexity 29 of function readAny() is high (> 15) (gocyclo)
    • Line 737: warning: cyclomatic complexity 23 of function readAnyArray() is high (> 15) (gocyclo)
    • Line 827: warning: cyclomatic complexity 20 of function readComposite() is high (> 15) (gocyclo)
    • go-amqp/link.go
    • Line 79: warning: cyclomatic complexity 28 of function attachLink() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 22 of function (*link).mux() is high (> 15) (gocyclo)
    • Line 669: warning: cyclomatic complexity 20 of function (*link).muxDetach() is high (> 15) (gocyclo)
    • Line 395: warning: cyclomatic complexity 19 of function (*link).muxReceive() is high (> 15) (gocyclo)
    • Line 532: warning: cyclomatic complexity 18 of function (*link).muxHandleFrame() is high (> 15) (gocyclo)
    • go-amqp/conn.go
    • Line 440: warning: cyclomatic complexity 27 of function (*conn).connReader() is high (> 15) (gocyclo)
    • Line 325: warning: cyclomatic complexity 19 of function (*conn).mux() is high (> 15) (gocyclo)
    • go-amqp/integration_test.go
    • Line 57: warning: cyclomatic complexity 20 of function TestIntegrationRoundTrip() is high (> 15) (gocyclo)
    • Line 336: warning: cyclomatic complexity 17 of function TestIntegrationReceiverModeSecond() is high (> 15) (gocyclo)

ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words

    • go-amqp/receiver_test.go
    • Line 45: warning: "dispostion" is a misspelling of "disposition" (misspell)
    • Line 67: warning: "dispostion" is a misspelling of "disposition" (misspell)
    • Line 96: warning: "dispostion" is a misspelling of "disposition" (misspell)