Preparing report...

Report for github.com/wenerme/go-wecom

A+    Excellent!    Found 20 issues across 70 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!


gocyclo100%

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.

No problems detected. Good job!


golint71%

Golint is a linter for Go source code.

    • go-wecom/wecom/client_contacts_more.go
    • Line 63: warning: exported type UserExternalProfile should have comment or be unexported (golint)
    • Line 76: warning: exported type BatchSyncCallback should have comment or be unexported (golint)
    • Line 85: warning: exported type BatchGetResult should have comment or be unexported (golint)
    • Line 173: warning: exported type GetTagResponseUserItem should have comment or be unexported (golint)
    • go-wecom/wecom/client_service_app_auth.go
    • Line 122: warning: comment on exported type SuiteTokenResponse should be of the form "SuiteTokenResponse ..." (with optional leading article) (golint)
    • Line 138: warning: comment on exported type PreAuthCodeResponse should be of the form "PreAuthCodeResponse ..." (with optional leading article) (golint)
    • go-wecom/wecom/dto_service_push_event.go
    • Line 77: warning: exported type ChangeContactCreateUserPushEvent should have comment or be unexported (golint)
    • Line 127: warning: exported type ChangeContactUpdateUserPushEvent should have comment or be unexported (golint)
    • Line 179: warning: exported type ChangeContactDeleteUserPushEvent should have comment or be unexported (golint)
    • Line 205: warning: exported type ProviderChangeContactCreatePartyPushEvent should have comment or be unexported (golint)
    • Line 237: warning: exported type ChangeContactUpdatePartyPushEvent should have comment or be unexported (golint)
    • Line 267: warning: exported type ChangeContactDeletePartyPushEvent should have comment or be unexported (golint)
    • Line 293: warning: exported type ChangeContactUpdateTagPushEvent should have comment or be unexported (golint)
    • go-wecom/wecom/client_service.go
    • Line 9: warning: exported method Client.GetProviderToken should have comment or be unexported (golint)
    • Line 25: warning: exported type ProviderGetLoginInfoRequest should have comment or be unexported (golint)
    • Line 48: warning: exported type ProviderGetLoginInfoResponse should have comment or be unexported (golint)
    • go-wecom/wecom/dto.go
    • Line 7: warning: exported type GenericResponse should have comment or be unexported (golint)
    • Line 12: warning: exported method GenericResponse.AsError should have comment or be unexported (golint)
    • Line 23: warning: exported type TokenResponse should have comment or be unexported (golint)
    • Line 29: warning: exported type GetProviderTokenRequest should have comment or be unexported (golint)
    • Line 34: warning: exported type ProviderTokenResponse should have comment or be unexported (golint)
    • Line 40: warning: exported type TicketResponse should have comment or be unexported (golint)
    • Line 46: warning: exported type IPListResponse should have comment or be unexported (golint)
    • go-wecom/wecom/message_audit.go
    • Line 16: warning: exported method MessageAuditNotifyPushEvent.EventType should have comment or be unexported (golint)
    • Line 20: warning: exported type ChangeExternalContactMessageAuditApproved should have comment or be unexported (golint)
    • Line 33: warning: exported method ChangeExternalContactMessageAuditApproved.EventType should have comment or be unexported (golint)
    • Line 37: warning: exported method ChangeExternalContactMessageAuditApproved.EventChangeType should have comment or be unexported (golint)
    • go-wecom/wecom/push_event.go
    • Line 12: warning: exported type EventModel should have comment or be unexported (golint)
    • Line 19: warning: exported type MessageModel should have comment or be unexported (golint)
    • Line 24: warning: exported type EventChangeModel should have comment or be unexported (golint)
    • Line 29: warning: exported function RegisterEventModel should have comment or be unexported (golint)
    • Line 64: warning: exported function UnmarshalCommonEvent should have comment or be unexported (golint)
    • Line 77: warning: exported function UnmarshalEvent should have comment or be unexported (golint)
    • go-wecom/wecom/sign.go
    • Line 9: warning: exported type JsSdkConfig should have comment or be unexported (golint)
    • Line 16: warning: exported type JsSdkAgentConfig should have comment or be unexported (golint)
    • Line 24: warning: exported method Client.SignAgentConfig should have comment or be unexported (golint)
    • Line 37: warning: exported method Client.SignConfig should have comment or be unexported (golint)
    • Line 49: warning: exported method JsSdkConfig.Sign should have comment or be unexported (golint)
    • Line 60: warning: exported method JsSdkAgentConfig.Sign should have comment or be unexported (golint)
    • go-wecom/wecom/token.go
    • Line 12: warning: exported type OpaqueToken should have comment or be unexported (golint)
    • Line 17: warning: exported method ProviderTokenResponse.GetToken should have comment or be unexported (golint)
    • Line 21: warning: exported method ProviderTokenResponse.GetExpiresIn should have comment or be unexported (golint)
    • Line 25: warning: exported method TokenResponse.GetToken should have comment or be unexported (golint)
    • Line 29: warning: exported method TokenResponse.GetExpiresIn should have comment or be unexported (golint)
    • Line 33: warning: exported method TicketResponse.GetToken should have comment or be unexported (golint)
    • Line 37: warning: exported method TicketResponse.GetExpiresIn should have comment or be unexported (golint)
    • Line 41: warning: exported method SuiteTokenResponse.GetToken should have comment or be unexported (golint)
    • Line 45: warning: exported method SuiteTokenResponse.GetExpiresIn should have comment or be unexported (golint)
    • Line 49: warning: exported method PreAuthCodeResponse.GetToken should have comment or be unexported (golint)
    • Line 53: warning: exported method PreAuthCodeResponse.GetExpiresIn should have comment or be unexported (golint)
    • Line 57: warning: exported method ProviderGetCorpTokenResponse.GetToken should have comment or be unexported (golint)
    • Line 61: warning: exported method ProviderGetCorpTokenResponse.GetExpiresIn should have comment or be unexported (golint)
    • Line 65: warning: exported type GenericToken should have comment or be unexported (golint)
    • Line 74: warning: exported method GenericToken.IsValid should have comment or be unexported (golint)
    • Line 81: warning: exported method GenericToken.GetToken should have comment or be unexported (golint)
    • Line 85: warning: exported method GenericToken.GetExpiresAt should have comment or be unexported (golint)
    • Line 89: warning: exported method GenericToken.GetExpiresIn should have comment or be unexported (golint)
    • Line 93: warning: exported method GenericToken.SetFromToken should have comment or be unexported (golint)
    • Line 140: warning: exported method GenericToken.ShouldRefresh should have comment or be unexported (golint)
    • Line 152: warning: exported type TokenCache should have comment or be unexported (golint)
    • Line 167: warning: exported method TokenCache.Refresh should have comment or be unexported (golint)
    • Line 179: warning: exported type TokenProvider should have comment or be unexported (golint)
    • Line 183: warning: exported type TokenLoadStore should have comment or be unexported (golint)
    • Line 187: warning: exported type SyncMapStore should have comment or be unexported (golint)
    • Line 197: warning: exported method SyncMapStore.Restore should have comment or be unexported (golint)
    • Line 213: warning: exported method SyncMapStore.Dump should have comment or be unexported (golint)
    • Line 232: warning: exported method SyncMapStore.Set should have comment or be unexported (golint)
    • Line 247: warning: exported method SyncMapStore.Load should have comment or be unexported (golint)
    • Line 275: warning: exported method SyncMapStore.Get should have comment or be unexported (golint)
    • go-wecom/wwcrypt/crypt.go
    • Line 17: warning: exported type Crypto should have comment or be unexported (golint)
    • Line 27: warning: exported method Crypto.Reset should have comment or be unexported (golint)
    • Line 32: warning: exported method Crypto.EncryptMessage should have comment or be unexported (golint)
    • Line 49: warning: exported method Crypto.DecryptMessage should have comment or be unexported (golint)
    • Line 65: warning: exported method Crypto.Verify should have comment or be unexported (golint)
    • Line 76: warning: exported method Crypto.Signature should have comment or be unexported (golint)
    • Line 83: warning: exported method Crypto.Encrypt should have comment or be unexported (golint)
    • Line 95: warning: exported method Crypto.Decrypt should have comment or be unexported (golint)
    • Line 106: warning: exported method Crypto.GetAESKey should have comment or be unexported (golint)
    • Line 126: warning: exported method Crypto.GetDecrypter should have comment or be unexported (golint)
    • Line 134: warning: exported method Crypto.GetEncrypter should have comment or be unexported (golint)
    • go-wecom/wecom/client_service_contacts_more.go
    • Line 5: warning: exported type ProviderBatchGetResult should have comment or be unexported (golint)
    • Line 12: warning: comment on exported type ProviderBatchJobResultPushEvent should be of the form "ProviderBatchJobResultPushEvent ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported type SuiteBatchJobResultPushEvent should be of the form "SuiteBatchJobResultPushEvent ..." (with optional leading article) (golint)
    • Line 48: warning: exported method ProviderBatchJobResultPushEvent.EventType should have comment or be unexported (golint)
    • Line 52: warning: exported method SuiteBatchJobResultPushEvent.EventType should have comment or be unexported (golint)
    • go-wecom/wecom/ctx.go
    • Line 14: warning: exported const ClientContextKey should have comment or be unexported (golint)
    • Line 16: warning: exported function FromContext should have comment or be unexported (golint)
    • Line 24: warning: exported function NewContext should have comment or be unexported (golint)
    • go-wecom/wecom/dto_push.go
    • Line 10: warning: exported type EncryptPushEvent should have comment or be unexported (golint)
    • Line 25: warning: exported type CommonPushEvent should have comment or be unexported (golint)
    • Line 51: warning: exported method CommonPushEvent.IsProviderEvent should have comment or be unexported (golint)
    • Line 55: warning: exported method CommonPushEvent.IsMessage should have comment or be unexported (golint)
    • Line 59: warning: exported method CommonPushEvent.IsEvent should have comment or be unexported (golint)
    • Line 63: warning: exported method CommonPushEvent.GetMessageType should have comment or be unexported (golint)
    • Line 67: warning: exported method CommonPushEvent.GetEventType should have comment or be unexported (golint)
    • Line 80: warning: exported method CommonPushEvent.GetTimestamp should have comment or be unexported (golint)
    • Line 87: warning: exported type ChangeContactExtAttrItem should have comment or be unexported (golint)
    • Line 92: warning: exported type ChangeContactExtAttr should have comment or be unexported (golint)
    • go-wecom/wecom/client_message_audit_more.go
    • Line 33: warning: exported type MessageAuditCheckSingleAgreeRequest should have comment or be unexported (golint)
    • Line 43: warning: exported type MessageAuditCheckSingleAgreeResponse should have comment or be unexported (golint)
    • Line 57: warning: exported type MessageAuditCheckRoomAgreeRequest should have comment or be unexported (golint)
    • Line 62: warning: exported type MessageAuditCheckRoomAgreeResponse should have comment or be unexported (golint)
    • Line 74: warning: exported type MessageAuditGetGroupChatMember should have comment or be unexported (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!