Preparing report...

Report for github.com/sudhagarc/libsignal-protocol-go

A+    Excellent!    Found 19 issues across 89 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!


gocyclo98%

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.


golint80%

Golint is a linter for Go source code.

    • libsignal-protocol-go/util/keyhelper/KeyHelper.go
    • Line 95: warning: exported function GenerateSenderSigningKey should have comment or be unexported (golint)
    • Line 99: warning: exported function GenerateSenderKey should have comment or be unexported (golint)
    • Line 105: warning: exported function GenerateSenderKeyID should have comment or be unexported (golint)
    • libsignal-protocol-go/protocol/CiphertextMessage.go
    • Line 3: warning: exported type CiphertextMessage should have comment or be unexported (golint)
    • Line 8: warning: exported const UnsupportedVersion should have comment or be unexported (golint)
    • Line 9: warning: exported const CurrentVersion should have comment or be unexported (golint)
    • Line 11: warning: exported const WHISPER_TYPE should have comment or be unexported (golint)
    • Line 12: warning: exported const PREKEY_TYPE should have comment or be unexported (golint)
    • Line 13: warning: exported const SENDERKEY_TYPE should have comment or be unexported (golint)
    • Line 14: warning: exported const SENDERKEY_DISTRIBUTION_TYPE should have comment or be unexported (golint)
    • libsignal-protocol-go/mixin_signal_protocol_store.go
    • Line 11: warning: exported function NewMixinSignalProtocolStore should have comment or be unexported (golint)
    • Line 21: warning: exported type MixinSignalProtocolStore should have comment or be unexported (golint)
    • Line 29: warning: exported method MixinSignalProtocolStore.GetIdentityKeyPair should have comment or be unexported (golint)
    • Line 33: warning: exported method MixinSignalProtocolStore.GetLocalRegistrationId should have comment or be unexported (golint)
    • Line 37: warning: exported method MixinSignalProtocolStore.SaveIdentity should have comment or be unexported (golint)
    • Line 41: warning: exported method MixinSignalProtocolStore.IsTrustedIdentity should have comment or be unexported (golint)
    • Line 45: warning: exported method MixinSignalProtocolStore.LoadPreKey should have comment or be unexported (golint)
    • Line 49: warning: exported method MixinSignalProtocolStore.StorePreKey should have comment or be unexported (golint)
    • Line 53: warning: exported method MixinSignalProtocolStore.ContainsPreKey should have comment or be unexported (golint)
    • Line 57: warning: exported method MixinSignalProtocolStore.RemovePreKey should have comment or be unexported (golint)
    • Line 61: warning: exported method MixinSignalProtocolStore.LoadSession should have comment or be unexported (golint)
    • Line 65: warning: exported method MixinSignalProtocolStore.GetSubDeviceSessions should have comment or be unexported (golint)
    • Line 69: warning: exported method MixinSignalProtocolStore.StoreSession should have comment or be unexported (golint)
    • Line 73: warning: exported method MixinSignalProtocolStore.ContainsSession should have comment or be unexported (golint)
    • Line 77: warning: exported method MixinSignalProtocolStore.DeleteSession should have comment or be unexported (golint)
    • Line 81: warning: exported method MixinSignalProtocolStore.DeleteAllSessions should have comment or be unexported (golint)
    • Line 86: warning: exported method MixinSignalProtocolStore.LoadSignedPreKey should have comment or be unexported (golint)
    • Line 90: warning: exported method MixinSignalProtocolStore.LoadSignedPreKeys should have comment or be unexported (golint)
    • Line 94: warning: exported method MixinSignalProtocolStore.StoreSignedPreKey should have comment or be unexported (golint)
    • Line 98: warning: exported method MixinSignalProtocolStore.ContainsSignedPreKey should have comment or be unexported (golint)
    • Line 102: warning: exported method MixinSignalProtocolStore.RemoveSignedPreKey should have comment or be unexported (golint)
    • Line 106: warning: exported method MixinSignalProtocolStore.StoreSenderKey should have comment or be unexported (golint)
    • Line 110: warning: exported method MixinSignalProtocolStore.LoadSenderKey should have comment or be unexported (golint)
    • libsignal-protocol-go/session/SessionCipher.go
    • Line 37: warning: exported function NewCipherFromSession should have comment or be unexported (golint)
    • Line 165: warning: exported method Cipher.DecryptMessage should have comment or be unexported (golint)
    • Line 170: warning: exported method Cipher.DecryptMessageReturnKey should have comment or be unexported (golint)
    • libsignal-protocol-go/cipher/Cbc.go
    • Line 1: warning: package comment should be of the form "Package cipher ..." (golint)
    • Line 26: warning: comment on exported function DecryptCbc should be of the form "DecryptCbc ..." (golint)
    • Line 51: warning: comment on exported function EncryptCbc should be of the form "EncryptCbc ..." (golint)
    • libsignal-protocol-go/groups/ratchet/SenderChainKey.go
    • Line 28: warning: comment on exported function NewStructFromSenderChainKey should be of the form "NewStructFromSenderChainKey ..." (golint)
    • Line 42: warning: exported type SenderChainKey should have comment or be unexported (golint)
    • Line 47: warning: exported method SenderChainKey.Iteration should have comment or be unexported (golint)
    • Line 51: warning: exported method SenderChainKey.SenderMessageKey should have comment or be unexported (golint)
    • Line 55: warning: exported method SenderChainKey.Next should have comment or be unexported (golint)
    • Line 59: warning: exported method SenderChainKey.Seed should have comment or be unexported (golint)
    • libsignal-protocol-go/main.go
    • Line 118: warning: exported type ConsumeSignedPreKey should have comment or be unexported (golint)
    • Line 124: warning: exported type ConsumeOneTimeKey should have comment or be unexported (golint)
    • Line 129: warning: exported type ConsumePreKeyBundle should have comment or be unexported (golint)
    • Line 243: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • libsignal-protocol-go/mixin_store.go
    • Line 19: warning: comment on exported function NewMixinIdentityKeyStore should be of the form "NewMixinIdentityKeyStore ..." (golint)
    • Line 24: warning: exported type MixinIdentityKeyStore should have comment or be unexported (golint)
    • Line 27: warning: exported method MixinIdentityKeyStore.GetIdentityKeyPair should have comment or be unexported (golint)
    • Line 40: warning: exported method MixinIdentityKeyStore.GetLocalRegistrationId should have comment or be unexported (golint)
    • Line 45: warning: exported method MixinIdentityKeyStore.SaveIdentity should have comment or be unexported (golint)
    • Line 50: warning: exported method MixinIdentityKeyStore.IsTrustedIdentity should have comment or be unexported (golint)
    • Line 63: warning: comment on exported function NewMixinPreKeyStore should be of the form "NewMixinPreKeyStore ..." (golint)
    • Line 70: warning: exported type MixinPreKeyStore should have comment or be unexported (golint)
    • Line 74: warning: exported method MixinPreKeyStore.LoadPreKey should have comment or be unexported (golint)
    • Line 87: warning: exported method MixinPreKeyStore.StorePreKey should have comment or be unexported (golint)
    • Line 92: warning: exported method MixinPreKeyStore.ContainsPreKey should have comment or be unexported (golint)
    • Line 100: warning: exported method MixinPreKeyStore.RemovePreKey should have comment or be unexported (golint)
    • Line 104: warning: comment on exported function NewMixinSessionStore should be of the form "NewMixinSessionStore ..." (golint)
    • Line 111: warning: exported type MixinSessionStore should have comment or be unexported (golint)
    • Line 115: warning: exported method MixinSessionStore.LoadSession should have comment or be unexported (golint)
    • Line 133: warning: exported method MixinSessionStore.GetSubDeviceSessions should have comment or be unexported (golint)
    • Line 139: warning: exported method MixinSessionStore.StoreSession should have comment or be unexported (golint)
    • Line 144: warning: exported method MixinSessionStore.ContainsSession should have comment or be unexported (golint)
    • Line 152: warning: exported method MixinSessionStore.DeleteSession should have comment or be unexported (golint)
    • Line 156: warning: exported method MixinSessionStore.DeleteAllSessions should have comment or be unexported (golint)
    • Line 160: warning: comment on exported function NewMixinSignedPreKeyStore should be of the form "NewMixinSignedPreKeyStore ..." (golint)
    • Line 167: warning: exported type MixinSignedPreKeyStore should have comment or be unexported (golint)
    • Line 171: warning: exported method MixinSignedPreKeyStore.LoadSignedPreKey should have comment or be unexported (golint)
    • Line 186: warning: exported method MixinSignedPreKeyStore.LoadSignedPreKeys should have comment or be unexported (golint)
    • Line 201: warning: exported method MixinSignedPreKeyStore.StoreSignedPreKey should have comment or be unexported (golint)
    • Line 206: warning: exported method MixinSignedPreKeyStore.ContainsSignedPreKey should have comment or be unexported (golint)
    • Line 214: warning: exported method MixinSignedPreKeyStore.RemoveSignedPreKey should have comment or be unexported (golint)
    • Line 218: warning: exported function NewMixinSenderKeyStore should have comment or be unexported (golint)
    • Line 225: warning: exported type MixinSenderKeyStore should have comment or be unexported (golint)
    • Line 230: warning: exported method MixinSenderKeyStore.StoreSenderKey should have comment or be unexported (golint)
    • Line 235: warning: exported method MixinSenderKeyStore.LoadSenderKey should have comment or be unexported (golint)
    • libsignal-protocol-go/protocol/PreKeySignalMessage.go
    • Line 121: warning: exported method PreKeySignalMessage.MessageVersion should have comment or be unexported (golint)
    • Line 125: warning: exported method PreKeySignalMessage.IdentityKey should have comment or be unexported (golint)
    • Line 129: warning: exported method PreKeySignalMessage.RegistrationID should have comment or be unexported (golint)
    • Line 133: warning: exported method PreKeySignalMessage.PreKeyID should have comment or be unexported (golint)
    • Line 137: warning: exported method PreKeySignalMessage.SignedPreKeyID should have comment or be unexported (golint)
    • Line 141: warning: exported method PreKeySignalMessage.BaseKey should have comment or be unexported (golint)
    • Line 145: warning: exported method PreKeySignalMessage.WhisperMessage should have comment or be unexported (golint)
    • Line 149: warning: exported method PreKeySignalMessage.Serialize should have comment or be unexported (golint)
    • Line 153: warning: exported method PreKeySignalMessage.Type should have comment or be unexported (golint)
    • libsignal-protocol-go/tests/stores.go
    • Line 13: warning: comment on exported function NewInMemoryIdentityKey should be of the form "NewInMemoryIdentityKey ..." (golint)
    • Line 22: warning: exported type InMemoryIdentityKey should have comment or be unexported (golint)
    • Line 28: warning: exported method InMemoryIdentityKey.GetIdentityKeyPair should have comment or be unexported (golint)
    • Line 32: warning: exported method InMemoryIdentityKey.GetLocalRegistrationId should have comment or be unexported (golint)
    • Line 36: warning: exported method InMemoryIdentityKey.SaveIdentity should have comment or be unexported (golint)
    • Line 40: warning: exported method InMemoryIdentityKey.IsTrustedIdentity should have comment or be unexported (golint)
    • Line 45: warning: comment on exported function NewInMemoryPreKey should be of the form "NewInMemoryPreKey ..." (golint)
    • Line 52: warning: exported type InMemoryPreKey should have comment or be unexported (golint)
    • Line 56: warning: exported method InMemoryPreKey.LoadPreKey should have comment or be unexported (golint)
    • Line 60: warning: exported method InMemoryPreKey.StorePreKey should have comment or be unexported (golint)
    • Line 64: warning: exported method InMemoryPreKey.ContainsPreKey should have comment or be unexported (golint)
    • Line 69: warning: exported method InMemoryPreKey.RemovePreKey should have comment or be unexported (golint)
    • Line 73: warning: comment on exported function NewInMemorySession should be of the form "NewInMemorySession ..." (golint)
    • Line 81: warning: exported type InMemorySession should have comment or be unexported (golint)
    • Line 86: warning: exported method InMemorySession.LoadSession should have comment or be unexported (golint)
    • Line 96: warning: exported method InMemorySession.GetSubDeviceSessions should have comment or be unexported (golint)
    • Line 108: warning: exported method InMemorySession.StoreSession should have comment or be unexported (golint)
    • Line 112: warning: exported method InMemorySession.ContainsSession should have comment or be unexported (golint)
    • Line 117: warning: exported method InMemorySession.DeleteSession should have comment or be unexported (golint)
    • Line 121: warning: exported method InMemorySession.DeleteAllSessions should have comment or be unexported (golint)
    • Line 125: warning: comment on exported function NewInMemorySignedPreKey should be of the form "NewInMemorySignedPreKey ..." (golint)
    • Line 132: warning: exported type InMemorySignedPreKey should have comment or be unexported (golint)
    • Line 136: warning: exported method InMemorySignedPreKey.LoadSignedPreKey should have comment or be unexported (golint)
    • Line 140: warning: exported method InMemorySignedPreKey.LoadSignedPreKeys should have comment or be unexported (golint)
    • Line 150: warning: exported method InMemorySignedPreKey.StoreSignedPreKey should have comment or be unexported (golint)
    • Line 154: warning: exported method InMemorySignedPreKey.ContainsSignedPreKey should have comment or be unexported (golint)
    • Line 159: warning: exported method InMemorySignedPreKey.RemoveSignedPreKey should have comment or be unexported (golint)
    • Line 163: warning: exported function NewInMemorySenderKey should have comment or be unexported (golint)
    • Line 169: warning: exported type InMemorySenderKey should have comment or be unexported (golint)
    • Line 173: warning: exported method InMemorySenderKey.StoreSenderKey should have comment or be unexported (golint)
    • Line 177: warning: exported method InMemorySenderKey.LoadSenderKey should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!