Preparing report...

Report for github.com/schollz/croc

A+    Excellent!    Found 6 issues across 18 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!


gocyclo83%

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.

    • croc/src/tcp/tcp.go
    • Line 153: warning: cyclomatic complexity 26 of function (*server).clientCommunication() is high (> 15) (gocyclo)
    • Line 408: warning: cyclomatic complexity 20 of function ConnectToTCPServer() is high (> 15) (gocyclo)
    • croc/src/cli/cli.go
    • Line 179: warning: cyclomatic complexity 26 of function send() is high (> 15) (gocyclo)
    • Line 395: warning: cyclomatic complexity 24 of function receive() is high (> 15) (gocyclo)
    • croc/src/croc/croc.go
    • Line 494: warning: cyclomatic complexity 39 of function (*Client).Receive() is high (> 15) (gocyclo)
    • Line 355: warning: cyclomatic complexity 29 of function (*Client).Send() is high (> 15) (gocyclo)
    • Line 1233: warning: cyclomatic complexity 23 of function (*Client).updateIfRecipientHasFileInfo() is high (> 15) (gocyclo)
    • Line 955: warning: cyclomatic complexity 19 of function (*Client).processMessage() is high (> 15) (gocyclo)
    • Line 693: warning: cyclomatic complexity 19 of function (*Client).transfer() is high (> 15) (gocyclo)
    • Line 768: warning: cyclomatic complexity 18 of function (*Client).processMessageFileInfo() is high (> 15) (gocyclo)
    • Line 191: warning: cyclomatic complexity 17 of function (*Client).sendCollectFiles() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • croc/src/comm/comm.go
    • Line 18: warning: exported var Socks5Proxy should have comment or be unexported (golint)
    • Line 20: warning: exported var MAGIC_BYTES should have comment or be unexported (golint)
    • croc/src/croc/croc.go
    • Line 478: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1260: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • croc/src/utils/utils.go
    • Line 161: warning: exported function GenerateRandomPin should have comment or be unexported (golint)
    • Line 285: warning: exported function RandomFileName should have comment or be unexported (golint)
    • Line 295: warning: exported function FindOpenPorts should have comment or be unexported (golint)
    • Line 335: warning: exported function IsLocalIP 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.

    • croc/src/crypt/crypt_test.go
    • Line 55: warning: ineffectual assignment to err (ineffassign)
    • Line 61: warning: ineffectual assignment to err (ineffassign)
    • Line 67: warning: ineffectual assignment to dec (ineffassign)
    • Line 87: warning: ineffectual assignment to err (ineffassign)
    • Line 93: warning: ineffectual assignment to err (ineffassign)
    • Line 99: warning: ineffectual assignment to dec (ineffassign)

misspell94%

Misspell Finds commonly misspelled English words