Preparing report...

Report for github.com/arthurkiller/shadowsocks-go

A+    Excellent!    Found 13 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.


golint66%

Golint is a linter for Go source code.

    • shadowsocks-go/shadowsocks/udpRelay.go
    • Line 37: warning: comment on exported var UDPMaxSize should be of the form "UDPMaxSize ..." (golint)
    • Line 45: warning: exported var UDPBufferPool should have comment or be unexported (golint)
    • Line 57: warning: exported type NatPacketUnit should have comment or be unexported (golint)
    • Line 75: warning: exported method NatTable.Get should have comment or be unexported (golint)
    • Line 82: warning: exported method NatTable.Put should have comment or be unexported (golint)
    • shadowsocks-go/shadowsocks/config.go
    • Line 80: warning: exported method Config.Check should have comment or be unexported (golint)
    • Line 242: warning: exported method Config.GetServer should have comment or be unexported (golint)
    • Line 246: warning: exported method Config.GetServerRoundRobin should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign50%

IneffAssign detects ineffectual assignments in Go code.

    • shadowsocks-go/shadowsocks/config.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: could not import github.com/arthurkiller/shadowsocks-go/encrypt (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import go.uber.org/zap (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/arthurkiller/shadowsocks-go/encrypt (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import go.uber.org/zap (invalid package name: "") (ineffassign)
    • shadowsocks-go/shadowsocks/log.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import go.uber.org/zap/zapcore (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import go.uber.org/zap/zapcore (invalid package name: "") (ineffassign)
    • shadowsocks-go/shadowsocks/tcpConn.go
    • Line 105: warning: c.DecryptorInited undefined (type *SecureConn has no field or method DecryptorInited) (ineffassign)
    • Line 106: warning: c.InitBolckSize undefined (type *SecureConn has no field or method InitBolckSize) (ineffassign)
    • Line 110: warning: c.InitBolckSize undefined (type *SecureConn has no field or method InitBolckSize) (ineffassign)
    • Line 111: warning: c.InitDecryptor undefined (type *SecureConn has no field or method InitDecryptor) (ineffassign)
    • Line 111: warning: c.InitBolckSize undefined (type *SecureConn has no field or method InitBolckSize) (ineffassign)
    • Line 167: warning: c.EncryptorInited undefined (type *SecureConn has no field or method EncryptorInited) (ineffassign)
    • Line 168: warning: c.InitEncryptor undefined (type *SecureConn has no field or method InitEncryptor) (ineffassign)
    • Line 177: warning: c.InitBolckSize undefined (type *SecureConn has no field or method InitBolckSize) (ineffassign)
    • Line 184: warning: c.Encrypt undefined (type *SecureConn has no field or method Encrypt) (ineffassign)
    • Line 105: warning: c.DecryptorInited undefined (type *SecureConn has no field or method DecryptorInited) (ineffassign)
    • Line 106: warning: c.InitBolckSize undefined (type *SecureConn has no field or method InitBolckSize) (ineffassign)
    • Line 110: warning: c.InitBolckSize undefined (type *SecureConn has no field or method InitBolckSize) (ineffassign)
    • Line 111: warning: c.InitDecryptor undefined (type *SecureConn has no field or method InitDecryptor) (ineffassign)
    • Line 111: warning: c.InitBolckSize undefined (type *SecureConn has no field or method InitBolckSize) (ineffassign)
    • Line 167: warning: c.EncryptorInited undefined (type *SecureConn has no field or method EncryptorInited) (ineffassign)
    • Line 168: warning: c.InitEncryptor undefined (type *SecureConn has no field or method InitEncryptor) (ineffassign)
    • Line 177: warning: c.InitBolckSize undefined (type *SecureConn has no field or method InitBolckSize) (ineffassign)
    • Line 184: warning: c.Encrypt undefined (type *SecureConn has no field or method Encrypt) (ineffassign)
    • shadowsocks-go/encrypt/aeadCipher.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import golang.org/x/crypto/chacha20poly1305 (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import golang.org/x/crypto/hkdf (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import golang.org/x/crypto/chacha20poly1305 (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import golang.org/x/crypto/hkdf (invalid package name: "") (ineffassign)
    • shadowsocks-go/encrypt/streamCipher_test.go
    • Line 17: warning: c.Encrypt undefined (type *Cipher has no field or method Encrypt) (ineffassign)
    • Line 18: warning: c.Decrypt undefined (type *Cipher has no field or method Decrypt) (ineffassign)
    • Line 42: warning: undeclared name: NewCipher (ineffassign)
    • Line 46: warning: cipher.Copy undefined (type *Cipher has no field or method Copy) (ineffassign)
    • Line 47: warning: cipher.InitEncrypt undefined (type *Cipher has no field or method InitEncrypt) (ineffassign)
    • Line 51: warning: cipher.InitDecrypt undefined (type *Cipher has no field or method InitDecrypt) (ineffassign)
    • Line 120: warning: ci.keyLen undefined (type struct{} has no field or method keyLen) (ineffassign)
    • Line 121: warning: ci.ivLen undefined (type struct{} has no field or method ivLen) (ineffassign)
    • Line 123: warning: ci.newStream undefined (type struct{} has no field or method newStream) (ineffassign)
    • Line 181: warning: ci.keyLen undefined (type struct{} has no field or method keyLen) (ineffassign)
    • Line 182: warning: ci.ivLen undefined (type struct{} has no field or method ivLen) (ineffassign)
    • Line 183: warning: ci.newStream undefined (type struct{} has no field or method newStream) (ineffassign)
    • Line 249: warning: ci.keyLen undefined (type struct{} has no field or method keyLen) (ineffassign)
    • Line 250: warning: ci.ivLen undefined (type struct{} has no field or method ivLen) (ineffassign)
    • Line 251: warning: ci.newStream undefined (type struct{} has no field or method newStream) (ineffassign)
    • Line 255: warning: ci.newStream undefined (type struct{} has no field or method newStream) (ineffassign)
    • shadowsocks-go/shadowsocks/udpConn.go
    • Line 54: warning: c.Unpack undefined (type *SecurePacketConn has no field or method Unpack) (ineffassign)
    • Line 60: warning: c.Pack undefined (type *SecurePacketConn has no field or method Pack) (ineffassign)
    • Line 54: warning: c.Unpack undefined (type *SecurePacketConn has no field or method Unpack) (ineffassign)
    • Line 60: warning: c.Pack undefined (type *SecurePacketConn has no field or method Pack) (ineffassign)
    • shadowsocks-go/cmd/shadowsocks-server/server.go
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: could not import go.uber.org/zap (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import github.com/arthurkiller/shadowsocks-go/encrypt (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import github.com/arthurkiller/shadowsocks-go/shadowsocks (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import github.com/miekg/dns (invalid package name: "") (ineffassign)
    • shadowsocks-go/cmd/shadowsocks-local/local.go
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: could not import go.uber.org/zap (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import github.com/arthurkiller/shadowsocks-go/encrypt (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import github.com/arthurkiller/shadowsocks-go/shadowsocks (invalid package name: "") (ineffassign)
    • shadowsocks-go/encrypt/streamCipher.go
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: could not import github.com/Yawning/chacha20 (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import golang.org/x/crypto/blowfish (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import golang.org/x/crypto/cast5 (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import golang.org/x/crypto/salsa20/salsa (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/Yawning/chacha20 (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import golang.org/x/crypto/blowfish (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import golang.org/x/crypto/cast5 (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import golang.org/x/crypto/salsa20/salsa (invalid package name: "") (ineffassign)

misspell66%

Misspell Finds commonly misspelled English words