Preparing report...

Report for github.com/chen-keinan/kube-knark

A+    Excellent!    Found 21 issues across 69 files

Tweet

gofmt97%

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!


gocyclo85%

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.

    • kube-knark/external/httpport/transport.go
    • Line 1038: warning: cyclomatic complexity 34 of function (*persistConn).readLoop() is high (> 15) (gocyclo)
    • Line 722: warning: cyclomatic complexity 29 of function (*Transport).dialConn() is high (> 15) (gocyclo)
    • Line 1390: warning: cyclomatic complexity 25 of function (*persistConn).roundTrip() is high (> 15) (gocyclo)
    • Line 855: warning: cyclomatic complexity 18 of function useProxy() is high (> 15) (gocyclo)
    • Line 263: warning: cyclomatic complexity 16 of function (*Transport).RoundTrip() is high (> 15) (gocyclo)
    • kube-knark/external/httpport/transfer.go
    • Line 307: warning: cyclomatic complexity 25 of function readTransfer() is high (> 15) (gocyclo)
    • Line 47: warning: cyclomatic complexity 21 of function newTransferWriter() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 16 of function (*transferWriter).WriteBody() is high (> 15) (gocyclo)
    • kube-knark/external/httpport/server.go
    • Line 862: warning: cyclomatic complexity 66 of function (*chunkWriter).writeHeader() is high (> 15) (gocyclo)
    • Line 1383: warning: cyclomatic complexity 25 of function (*conn).serve() is high (> 15) (gocyclo)
    • Line 684: warning: cyclomatic complexity 18 of function (*conn).readRequest() is high (> 15) (gocyclo)

golint71%

Golint is a linter for Go source code.

    • kube-knark/external/config_struct.go
    • Line 1: warning: package comment should be of the form "Package external ..." (golint)
    • Line 11: warning: comment on exported type Option should be of the form "Option ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported function ParseIntSet should be of the form "ParseIntSet ..." (golint)
    • Line 62: warning: comment on exported type IntSet should be of the form "IntSet ..." (with optional leading article) (golint)
    • Line 67: warning: comment on exported function NewIntSet should be of the form "NewIntSet ..." (golint)
    • Line 92: warning: comment on exported method IntSet.Contains should be of the form "Contains ..." (golint)
    • Line 102: warning: comment on exported type IntRange should be of the form "IntRange ..." (with optional leading article) (golint)
    • Line 108: warning: comment on exported function NewIntRange should be of the form "NewIntRange ..." (golint)
    • Line 116: warning: comment on exported method IntRange.Contains should be of the form "Contains ..." (golint)
    • kube-knark/external/httpport/transfer.go
    • Line 1: warning: package comment should be of the form "Package httpport ..." (golint)
    • Line 354: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 534: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • kube-knark/external/httpport/request.go
    • Line 5: warning: package comment should be of the form "Package httpport ..." (golint)
    • Line 34: warning: comment on exported type ProtocolError should be of the form "ProtocolError ..." (with optional leading article) (golint)
    • Line 42: warning: exported var ErrHeaderTooLong should have comment or be unexported (golint)
    • Line 398: warning: receiver name req should be consistent with previous receiver name r for Request (golint)
    • kube-knark/external/printer.go
    • Line 1: warning: package comment should be of the form "Package external ..." (golint)
    • Line 11: warning: exported var WaitGroup should have comment or be unexported (golint)
    • Line 12: warning: exported var PrinterWaitGroup should have comment or be unexported (golint)
    • Line 22: warning: exported function NewPrinter should have comment or be unexported (golint)
    • Line 30: warning: exported method Printer.Send should have comment or be unexported (golint)
    • Line 52: warning: exported method Printer.Finish should have comment or be unexported (golint)
    • kube-knark/external/tcp_assembly.go
    • Line 1: warning: package comment should be of the form "Package external ..." (golint)
    • Line 29: warning: exported function NewTCPAssembler should have comment or be unexported (golint)
    • Line 33: warning: exported method TCPAssembler.Assemble should have comment or be unexported (golint)
    • Line 96: warning: comment on exported method TCPAssembler.FlushOlderThan should be of the form "FlushOlderThan ..." (golint)
    • Line 115: warning: exported method TCPAssembler.FinishAll should have comment or be unexported (golint)
    • kube-knark/external/httpport/server.go
    • Line 5: warning: package comment should be of the form "Package httpport ..." (golint)
    • Line 1238: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 2141: warning: receiver name s should be consistent with previous receiver name srv for Server (golint)
    • Line 2157: warning: receiver name s should be consistent with previous receiver name srv for Server (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!


misspell95%

Misspell Finds commonly misspelled English words