Preparing report...

Report for github.com/kuzzleio/sdk-go

A+    Excellent!    Found 55 issues across 568 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!


gocyclo99%

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.


golint90%

Golint is a linter for Go source code.

    • sdk-go/protocol/websocket/web_socket.go
    • Line 31: warning: exported const MAX_EMIT_TIMEOUT should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported type WebSocket should have comment or be unexported (golint)
    • Line 166: warning: exported method WebSocket.Send should have comment or be unexported (golint)
    • Line 185: warning: exported method WebSocket.RegisterSub should have comment or be unexported (golint)
    • Line 204: warning: exported method WebSocket.UnregisterSub should have comment or be unexported (golint)
    • Line 221: warning: exported method WebSocket.CancelSubs should have comment or be unexported (golint)
    • Line 269: warning: comment on exported method WebSocket.AddListener should be of the form "AddListener ..." (golint)
    • Line 277: warning: comment on exported method WebSocket.RemoveAllListeners should be of the form "RemoveAllListeners ..." (golint)
    • Line 292: warning: comment on exported method WebSocket.RemoveListener should be of the form "RemoveListener ..." (golint)
    • Line 298: warning: exported method WebSocket.Once should have comment or be unexported (golint)
    • Line 305: warning: exported method WebSocket.ListenerCount should have comment or be unexported (golint)
    • Line 309: warning: comment on exported method WebSocket.EmitEvent should be of the form "EmitEvent ..." (golint)
    • Line 323: warning: exported method WebSocket.IsReady should have comment or be unexported (golint)
    • Line 351: warning: exported method WebSocket.Close should have comment or be unexported (golint)
    • Line 370: warning: exported method WebSocket.State should have comment or be unexported (golint)
    • Line 374: warning: exported method WebSocket.RequestHistory should have comment or be unexported (golint)
    • Line 378: warning: exported method WebSocket.Host should have comment or be unexported (golint)
    • Line 382: warning: exported method WebSocket.Port should have comment or be unexported (golint)
    • Line 386: warning: exported method WebSocket.SslConnection should have comment or be unexported (golint)
    • sdk-go/state/state.go
    • Line 18: warning: exported const Connecting should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: don't use underscores in Go names; const Logged_out should be LoggedOut (golint)
    • sdk-go/kuzzle/kuzzle.go
    • Line 37: warning: exported const MAX_CONNECT_RETRY should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported type OfflineQueueLoader should have comment or be unexported (golint)
    • Line 44: warning: exported type QueueFilter should have comment or be unexported (golint)
    • Line 46: warning: exported type Kuzzle should have comment or be unexported (golint)
    • Line 210: warning: exported method Kuzzle.SetJwt should have comment or be unexported (golint)
    • Line 225: warning: exported method Kuzzle.RegisterSub should have comment or be unexported (golint)
    • Line 229: warning: exported method Kuzzle.UnregisterSub should have comment or be unexported (golint)
    • Line 328: warning: exported method Kuzzle.Volatile should have comment or be unexported (golint)
    • Line 332: warning: exported method Kuzzle.SetVolatile should have comment or be unexported (golint)
    • Line 336: warning: exported method Kuzzle.EmitEvent should have comment or be unexported (golint)
    • sdk-go/types/search_result.go
    • Line 74: warning: exported method SearchResult.Kuzzle should have comment or be unexported (golint)
    • Line 78: warning: exported method SearchResult.Request should have comment or be unexported (golint)
    • Line 82: warning: exported method SearchResult.Response should have comment or be unexported (golint)
    • Line 86: warning: exported method SearchResult.Options should have comment or be unexported (golint)
    • Line 90: warning: exported method SearchResult.ScrollAction should have comment or be unexported (golint)
    • sdk-go/security/userSearchResult.go
    • Line 23: warning: exported type UserSearchResult should have comment or be unexported (golint)
    • Line 35: warning: exported method UserSearchResult.Request should have comment or be unexported (golint)
    • Line 39: warning: exported method UserSearchResult.Response should have comment or be unexported (golint)
    • Line 43: warning: exported method UserSearchResult.Options should have comment or be unexported (golint)
    • Line 48: warning: receiver name usr should be consistent with previous receiver name sr for UserSearchResult (golint)
    • sdk-go/security/profileSearchResult.go
    • Line 23: warning: exported type ProfileSearchResult should have comment or be unexported (golint)
    • Line 35: warning: exported method ProfileSearchResult.Request should have comment or be unexported (golint)
    • Line 39: warning: exported method ProfileSearchResult.Response should have comment or be unexported (golint)
    • Line 43: warning: exported method ProfileSearchResult.Options should have comment or be unexported (golint)
    • Line 48: warning: receiver name psr should be consistent with previous receiver name sr for ProfileSearchResult (golint)
    • sdk-go/security/user.go
    • Line 21: warning: exported type User should have comment or be unexported (golint)
    • Line 27: warning: exported function NewUser should have comment or be unexported (golint)
    • sdk-go/kuzzle/listener.go
    • Line 55: warning: exported method Kuzzle.Once should have comment or be unexported (golint)
    • Line 62: warning: exported method Kuzzle.ListenerCount should have comment or be unexported (golint)
    • sdk-go/types/kuzzle_response.go
    • Line 40: warning: exported type SubscribeResult should have comment or be unexported (golint)
    • Line 89: warning: exported type SpecificationField should have comment or be unexported (golint)
    • Line 117: warning: exported type SpecificationFields should have comment or be unexported (golint)
    • Line 119: warning: exported type Specification should have comment or be unexported (golint)
    • Line 125: warning: exported type MappingField should have comment or be unexported (golint)
    • Line 172: warning: exported type MappingFields should have comment or be unexported (golint)
    • Line 174: warning: exported type SpecificationEntry should have comment or be unexported (golint)
    • Line 180: warning: exported type SpecificationSearchResultHit should have comment or be unexported (golint)
    • Line 184: warning: exported type SpecificationSearchResult should have comment or be unexported (golint)
    • Line 190: warning: exported type ValidResponse should have comment or be unexported (golint)
    • Line 194: warning: exported type RealtimeResponse should have comment or be unexported (golint)
    • Line 198: warning: exported type ShardResponse should have comment or be unexported (golint)
    • Line 208: warning: exported type Statistics should have comment or be unexported (golint)
    • Line 216: warning: exported type LoginAttempt should have comment or be unexported (golint)
    • Line 221: warning: exported type Shards should have comment or be unexported (golint)
    • Line 227: warning: exported type CollectionsList should have comment or be unexported (golint)
    • Line 232: warning: exported type Controller should have comment or be unexported (golint)
    • Line 236: warning: exported type Controllers should have comment or be unexported (golint)
    • Line 240: warning: exported type CredentialStrategyFields should have comment or be unexported (golint)
    • Line 241: warning: exported type CredentialFields should have comment or be unexported (golint)
    • Line 243: warning: exported type Credentials should have comment or be unexported (golint)
    • Line 245: warning: exported type UserRights should have comment or be unexported (golint)
    • Line 253: warning: exported type Georadius should have comment or be unexported (golint)
    • Line 260: warning: exported type MSScanResponse should have comment or be unexported (golint)
    • sdk-go/security/profile.go
    • Line 21: warning: exported type Profile should have comment or be unexported (golint)
    • Line 26: warning: exported function NewProfile should have comment or be unexported (golint)
    • sdk-go/types/kuzzle_request.go
    • Line 19: warning: exported type KuzzleRequest should have comment or be unexported (golint)
    • Line 68: warning: exported method KuzzleRequest.AddCustomArg should have comment or be unexported (golint)
    • Line 75: warning: exported type SubscribeQuery should have comment or be unexported (golint)
    • Line 82: warning: exported type VolatileData should have comment or be unexported (golint)
    • Line 84: warning: exported type UserData should have comment or be unexported (golint)
    • Line 89: warning: exported type PolicyRestriction should have comment or be unexported (golint)
    • Line 94: warning: exported type Policy should have comment or be unexported (golint)
    • Line 99: warning: exported type Policies should have comment or be unexported (golint)
    • Line 103: warning: exported type GeoPoint should have comment or be unexported (golint)
    • Line 109: warning: exported type MsHashField should have comment or be unexported (golint)
    • Line 114: warning: exported type MSKeyValue should have comment or be unexported (golint)
    • Line 119: warning: exported type MSSortedSet should have comment or be unexported (golint)
    • Line 124: warning: exported type SearchFilters should have comment or be unexported (golint)
    • sdk-go/security/role.go
    • Line 21: warning: exported type Role should have comment or be unexported (golint)
    • Line 26: warning: exported function NewRole should have comment or be unexported (golint)
    • sdk-go/internal/mock_connection.go
    • Line 25: warning: exported type MockedConnection should have comment or be unexported (golint)
    • Line 38: warning: exported method MockedConnection.Send should have comment or be unexported (golint)
    • Line 46: warning: exported method MockedConnection.Connect should have comment or be unexported (golint)
    • Line 50: warning: exported method MockedConnection.Close should have comment or be unexported (golint)
    • Line 54: warning: exported method MockedConnection.AddListener should have comment or be unexported (golint)
    • Line 60: warning: exported method MockedConnection.Once should have comment or be unexported (golint)
    • Line 66: warning: exported method MockedConnection.ListenerCount should have comment or be unexported (golint)
    • Line 73: warning: exported method MockedConnection.State should have comment or be unexported (golint)
    • Line 77: warning: exported method MockedConnection.EmitEvent should have comment or be unexported (golint)
    • Line 83: warning: exported method MockedConnection.RegisterSub should have comment or be unexported (golint)
    • Line 86: warning: exported method MockedConnection.CancelSubs should have comment or be unexported (golint)
    • Line 88: warning: exported method MockedConnection.UnregisterSub should have comment or be unexported (golint)
    • Line 90: warning: exported method MockedConnection.RequestHistory should have comment or be unexported (golint)
    • Line 96: warning: exported method MockedConnection.RenewSubscriptions should have comment or be unexported (golint)
    • Line 98: warning: exported method MockedConnection.RemoveListener should have comment or be unexported (golint)
    • Line 104: warning: exported method MockedConnection.RemoveAllListeners should have comment or be unexported (golint)
    • Line 110: warning: exported method MockedConnection.AutoResubscribe should have comment or be unexported (golint)
    • Line 114: warning: exported method MockedConnection.Host should have comment or be unexported (golint)
    • Line 118: warning: exported method MockedConnection.IsReady should have comment or be unexported (golint)
    • Line 122: warning: exported method MockedConnection.Port should have comment or be unexported (golint)
    • Line 126: warning: exported method MockedConnection.ReconnectionDelay should have comment or be unexported (golint)
    • Line 130: warning: exported method MockedConnection.SslConnection should have comment or be unexported (golint)
    • Line 134: warning: comment on exported method MockedConnection.SetState should be of the form "SetState ..." (golint)
    • sdk-go/security/roleSearchResult.go
    • Line 23: warning: exported type RoleSearchResult should have comment or be unexported (golint)
    • Line 35: warning: exported method RoleSearchResult.Request should have comment or be unexported (golint)
    • Line 39: warning: exported method RoleSearchResult.Response should have comment or be unexported (golint)
    • Line 43: warning: exported method RoleSearchResult.Options should have comment or be unexported (golint)
    • Line 48: warning: receiver name rsr should be consistent with previous receiver name sr for RoleSearchResult (golint)
    • sdk-go/internal/mock_room.go
    • Line 19: warning: exported type MockedRoom should have comment or be unexported (golint)
    • Line 23: warning: exported method MockedRoom.Subscribe should have comment or be unexported (golint)
    • Line 26: warning: exported method MockedRoom.Unsubscribe should have comment or be unexported (golint)
    • Line 30: warning: exported method MockedRoom.GetRealtimeChannel should have comment or be unexported (golint)
    • Line 34: warning: exported method MockedRoom.GetResponseChannel should have comment or be unexported (golint)
    • Line 38: warning: exported method MockedRoom.RoomId should have comment or be unexported (golint)
    • Line 42: warning: exported method MockedRoom.Filters should have comment or be unexported (golint)
    • Line 46: warning: exported method MockedRoom.Channel should have comment or be unexported (golint)
    • Line 50: warning: exported method MockedRoom.Id should have comment or be unexported (golint)
    • Line 54: warning: exported method MockedRoom.SubscribeToSelf 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!


misspell99%

Misspell Finds commonly misspelled English words