Preparing report...

Report for github.com/golang/crypto

D    Needs lots of improvement    Found 60 issues across 322 files

Tweet

gofmt0%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

An error occurred while running this test (AddError: could not parse "_repos/src/github.com/golang/crypto/tea/fatal error: runtime: out of memory:1::warning: file is not gofmted with -s (gofmt)" - strconv.Atoi: parsing " runtime": invalid syntax)


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!


golint0%

Golint is a linter for Go source code.

An error occurred while running this test (exit status 3)


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.

    • crypto/ssh/cipher.go
    • Line 224: warning: cyclomatic complexity 18 of function (*streamPacketCipher).writeCipherPacket() is high (> 15) (gocyclo)
    • crypto/acme/autocert/autocert_test.go
    • Line 477: warning: cyclomatic complexity 27 of function startACMEServerStub() is high (> 15) (gocyclo)
    • Line 733: warning: cyclomatic complexity 21 of function TestRevokeFailedAuthz() is high (> 15) (gocyclo)
    • Line 638: warning: cyclomatic complexity 19 of function TestVerifyHTTP01() is high (> 15) (gocyclo)
    • Line 976: warning: cyclomatic complexity 17 of function TestValidCert() is high (> 15) (gocyclo)
    • crypto/otr/otr_test.go
    • Line 210: warning: cyclomatic complexity 25 of function roundTrip() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 18 of function performHandshake() is high (> 15) (gocyclo)
    • crypto/openpgp/write_test.go
    • Line 184: warning: cyclomatic complexity 25 of function TestEncryption() is high (> 15) (gocyclo)
    • Line 286: warning: cyclomatic complexity 20 of function TestSigning() is high (> 15) (gocyclo)
    • crypto/ssh/keys.go
    • Line 1277: warning: cyclomatic complexity 32 of function parseOpenSSHPrivateKey() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 26 of function ParseAuthorizedKey() is high (> 15) (gocyclo)
    • Line 967: warning: cyclomatic complexity 18 of function (*wrappedSigner).SignWithAlgorithm() is high (> 15) (gocyclo)
    • crypto/openpgp/packet/signature.go
    • Line 211: warning: cyclomatic complexity 47 of function parseSignatureSubpacket() is high (> 15) (gocyclo)
    • Line 82: warning: cyclomatic complexity 19 of function (*Signature).parse() is high (> 15) (gocyclo)
    • Line 599: warning: cyclomatic complexity 17 of function (*Signature).Serialize() is high (> 15) (gocyclo)
    • Line 670: warning: cyclomatic complexity 16 of function (*Signature).buildSubpackets() is high (> 15) (gocyclo)
    • crypto/otr/smp.go
    • Line 65: warning: cyclomatic complexity 23 of function (*Conversation).processSMP() is high (> 15) (gocyclo)
    • crypto/ssh/server.go
    • Line 398: warning: cyclomatic complexity 67 of function (*connection).serverAuthenticate() is high (> 15) (gocyclo)
    • Line 226: warning: cyclomatic complexity 17 of function (*connection).serverHandshake() is high (> 15) (gocyclo)
    • crypto/ssh/messages.go
    • Line 374: warning: cyclomatic complexity 35 of function Unmarshal() is high (> 15) (gocyclo)
    • Line 776: warning: cyclomatic complexity 30 of function decode() is high (> 15) (gocyclo)
    • Line 502: warning: cyclomatic complexity 23 of function marshalStruct() is high (> 15) (gocyclo)
    • crypto/acme/autocert/renewal_test.go
    • Line 192: warning: cyclomatic complexity 27 of function TestRenewFromCacheAlreadyRenewed() is high (> 15) (gocyclo)
    • Line 50: warning: cyclomatic complexity 26 of function TestRenewFromCache() is high (> 15) (gocyclo)
    • crypto/otr/otr.go
    • Line 272: warning: cyclomatic complexity 47 of function (*Conversation).Receive() is high (> 15) (gocyclo)
    • Line 867: warning: cyclomatic complexity 27 of function (*Conversation).processData() is high (> 15) (gocyclo)
    • crypto/ssh/client_auth.go
    • Line 398: warning: cyclomatic complexity 22 of function (KeyboardInteractiveChallenge).auth() is high (> 15) (gocyclo)
    • Line 545: warning: cyclomatic complexity 19 of function (*gssAPIWithMICCallback).auth() is high (> 15) (gocyclo)
    • crypto/ssh/mux_test.go
    • Line 383: warning: cyclomatic complexity 21 of function TestMuxClosedChannel() is high (> 15) (gocyclo)
    • Line 292: warning: cyclomatic complexity 16 of function TestMuxUnknownChannelRequests() is high (> 15) (gocyclo)
    • Line 505: warning: cyclomatic complexity 16 of function TestMuxGlobalRequest() is high (> 15) (gocyclo)
    • crypto/ssh/handshake.go
    • Line 527: warning: cyclomatic complexity 17 of function (*handshakeTransport).enterKeyExchange() is high (> 15) (gocyclo)
    • Line 259: warning: cyclomatic complexity 17 of function (*handshakeTransport).kexLoop() is high (> 15) (gocyclo)
    • crypto/openpgp/read.go
    • Line 86: warning: cyclomatic complexity 35 of function ReadMessage() is high (> 15) (gocyclo)
    • Line 363: warning: cyclomatic complexity 18 of function CheckDetachedSignature() is high (> 15) (gocyclo)

ineffassign99%

IneffAssign detects ineffectual assignments in Go code.

    • crypto/ed25519/internal/edwards25519/edwards25519.go
    • Line 1167: warning: ineffectual assignment to s23 (ineffassign)
    • Line 1175: warning: ineffectual assignment to s22 (ineffassign)
    • Line 1183: warning: ineffectual assignment to s21 (ineffassign)
    • Line 1191: warning: ineffectual assignment to s20 (ineffassign)
    • Line 1199: warning: ineffectual assignment to s19 (ineffassign)
    • Line 1207: warning: ineffectual assignment to s18 (ineffassign)
    • Line 1250: warning: ineffectual assignment to s17 (ineffassign)
    • Line 1258: warning: ineffectual assignment to s16 (ineffassign)
    • Line 1266: warning: ineffectual assignment to s15 (ineffassign)
    • Line 1274: warning: ineffectual assignment to s14 (ineffassign)
    • Line 1282: warning: ineffectual assignment to s13 (ineffassign)
    • Line 1381: warning: ineffectual assignment to s12 (ineffassign)
    • Line 1489: warning: ineffectual assignment to s23 (ineffassign)
    • Line 1497: warning: ineffectual assignment to s22 (ineffassign)
    • Line 1505: warning: ineffectual assignment to s21 (ineffassign)
    • Line 1513: warning: ineffectual assignment to s20 (ineffassign)
    • Line 1521: warning: ineffectual assignment to s19 (ineffassign)
    • Line 1529: warning: ineffectual assignment to s18 (ineffassign)
    • Line 1574: warning: ineffectual assignment to s17 (ineffassign)
    • Line 1582: warning: ineffectual assignment to s16 (ineffassign)
    • Line 1590: warning: ineffectual assignment to s15 (ineffassign)
    • Line 1598: warning: ineffectual assignment to s14 (ineffassign)
    • Line 1606: warning: ineffectual assignment to s13 (ineffassign)
    • Line 1705: warning: ineffectual assignment to s12 (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)