Preparing report...

Report for github.com/kubernetes-app/redis-operator

A    Great!    Found 10 issues across 17 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!


gocyclo94%

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.


golint41%

Golint is a linter for Go source code.

    • redis-operator/controllers/resources/statefulset.go
    • Line 1: warning: package comment should be of the form "Package resources ..." (golint)
    • Line 40: warning: exported method K8sClient.CreateOrUpdateRedisServer should have comment or be unexported (golint)
    • Line 61: warning: exported method K8sClient.FetchStatefulSet should have comment or be unexported (golint)
    • Line 79: warning: exported method K8sClient.GetRedisClusterNodes should have comment or be unexported (golint)
    • redis-operator/controllers/redis_controller.go
    • Line 147: warning: exported method RedisReconciler.CreateOrUpdateResisStatefulSet should have comment or be unexported (golint)
    • Line 161: warning: exported method RedisReconciler.CreateOrUpdateResisService should have comment or be unexported (golint)
    • Line 177: warning: exported method RedisReconciler.CreateResisCluster should have comment or be unexported (golint)
    • Line 197: warning: exported method RedisReconciler.AddRedisNodes should have comment or be unexported (golint)
    • Line 232: warning: exported method RedisReconciler.DeleteRedisNodes should have comment or be unexported (golint)
    • Line 275: warning: exported method RedisReconciler.ReconcileRedisStandalone should have comment or be unexported (golint)
    • Line 288: warning: comment on exported method RedisReconciler.WaitRedisNodesReady should be of the form "WaitRedisNodesReady ..." (golint)
    • Line 320: warning: comment on exported method RedisReconciler.WaitRedisNodeJoinCluster should be of the form "WaitRedisNodeJoinCluster ..." (golint)
    • Line 339: warning: comment on exported method RedisReconciler.WaitRedisClusterNodeDelete should be of the form "WaitRedisClusterNodeDelete ..." (golint)
    • Line 358: warning: comment on exported method RedisReconciler.WaitRedisClusterReady should be of the form "WaitRedisClusterReady ..." (golint)
    • Line 379: warning: comment on exported method RedisReconciler.WaitRedisNodeSlotEmpty should be of the form "WaitRedisNodeSlotEmpty ..." (golint)
    • Line 398: warning: exported method RedisReconciler.UpdateRedisNodesStatus should have comment or be unexported (golint)
    • redis-operator/api/v1alpha1/redis_node.go
    • Line 1: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 125: warning: comment on exported method Nodes.GetMasterNodes should be of the form "GetMasterNodes ..." (golint)
    • Line 136: warning: comment on exported method Nodes.GetMasterNodesWithSlot should be of the form "GetMasterNodesWithSlot ..." (golint)
    • Line 147: warning: comment on exported method Nodes.GetMasterNodesWithNoSlot should be of the form "GetMasterNodesWithNoSlot ..." (golint)
    • Line 158: warning: comment on exported method Nodes.GetSlaveNodes should be of the form "GetSlaveNodes ..." (golint)
    • Line 169: warning: comment on exported method Nodes.GetNodeWithIPPort should be of the form "GetNodeWithIPPort ..." (golint)
    • Line 191: warning: comment on exported method Nodes.GetNodeIds should be of the form "GetNodeIds ..." (golint)
    • Line 237: warning: exported method Nodes.GetIPPortByName should have comment or be unexported (golint)
    • Line 246: warning: exported method Nodes.GetIPPortsByRole should have comment or be unexported (golint)
    • redis-operator/api/v1alpha1/redis_types.go
    • Line 227: warning: exported method Redis.GetSize should have comment or be unexported (golint)
    • Line 231: warning: exported method Redis.GetPodSize should have comment or be unexported (golint)
    • Line 235: warning: exported method Redis.GetClusterSize should have comment or be unexported (golint)
    • Line 239: warning: exported method Redis.StatusMaxSize should have comment or be unexported (golint)
    • Line 246: warning: exported method Redis.StatusMinSize should have comment or be unexported (golint)
    • redis-operator/controllers/resources/services.go
    • Line 1: warning: package comment should be of the form "Package resources ..." (golint)
    • Line 31: warning: exported type ServiceMode should have comment or be unexported (golint)
    • Line 36: warning: exported const HeadService should have comment (or a comment on this block) or be unexported (golint)
    • Line 88: warning: exported method K8sClient.CreateRedisService should have comment or be unexported (golint)
    • redis-operator/controllers/redis/redis.go
    • Line 1: warning: package comment should be of the form "Package redis ..." (golint)
    • Line 207: warning: exported method Client.GetRedisClusterNodes should have comment or be unexported (golint)
    • Line 239: warning: exported function ParseNodeInfos should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

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


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!