Preparing report...

Report for github.com/zalando-incubator/es-operator

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


gocyclo96%

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.

    • es-operator/operator/operator.go
    • Line 389: warning: cyclomatic complexity 17 of function (*Operator).rescaleStatefulSet() is high (> 15) (gocyclo)
    • Line 275: warning: cyclomatic complexity 16 of function (*Operator).operatePods() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • es-operator/operator/elasticsearch.go
    • Line 37: warning: exported type ElasticsearchOperator should have comment or be unexported (golint)
    • Line 255: warning: exported type EDSResource should have comment or be unexported (golint)
    • Line 262: warning: exported method EDSResource.Name should have comment or be unexported (golint)
    • Line 266: warning: exported method EDSResource.Namespace should have comment or be unexported (golint)
    • Line 270: warning: exported method EDSResource.APIVersion should have comment or be unexported (golint)
    • Line 274: warning: exported method EDSResource.Kind should have comment or be unexported (golint)
    • Line 278: warning: exported method EDSResource.Labels should have comment or be unexported (golint)
    • Line 282: warning: exported method EDSResource.LabelSelector should have comment or be unexported (golint)
    • Line 286: warning: exported method EDSResource.Generation should have comment or be unexported (golint)
    • Line 290: warning: exported method EDSResource.UID should have comment or be unexported (golint)
    • Line 294: warning: exported method EDSResource.Replicas should have comment or be unexported (golint)
    • Line 298: warning: exported method EDSResource.PodTemplateSpec should have comment or be unexported (golint)
    • Line 309: warning: exported method EDSResource.VolumeClaimTemplates should have comment or be unexported (golint)
    • Line 324: warning: exported method EDSResource.EnsureResources should have comment or be unexported (golint)
    • Line 340: warning: exported method EDSResource.Self should have comment or be unexported (golint)
    • Line 701: warning: exported type ESResource should have comment or be unexported (golint)
    • es-operator/operator/es_client.go
    • Line 65: warning: exported type ESHealth should have comment or be unexported (golint)
    • Line 117: warning: exported method ESClient.Cleanup should have comment or be unexported (golint)
    • Line 321: warning: exported method ESClient.GetNodes should have comment or be unexported (golint)
    • Line 355: warning: exported method ESClient.GetShards should have comment or be unexported (golint)
    • Line 374: warning: exported method ESClient.GetIndices should have comment or be unexported (golint)
    • Line 412: warning: exported method ESClient.UpdateIndexSettings should have comment or be unexported (golint)
    • Line 450: warning: exported method ESClient.CreateIndex should have comment or be unexported (golint)
    • Line 472: warning: exported method ESClient.DeleteIndex should have comment or be unexported (golint)
    • es-operator/pkg/clientset/clientset.go
    • Line 14: warning: exported type ZInterface should have comment or be unexported (golint)
    • Line 16: warning: exported type Clientset should have comment or be unexported (golint)
    • Line 22: warning: exported method Clientset.ZalandoV1 should have comment or be unexported (golint)
    • Line 26: warning: exported method Clientset.MetricsV1Beta1 should have comment or be unexported (golint)
    • Line 30: warning: exported function NewClientset should have comment or be unexported (golint)
    • es-operator/pkg/apis/zalando.org/v1/types.go
    • Line 64: warning: comment on exported type EmbeddedObjectMetaWithName should be of the form "EmbeddedObjectMetaWithName ..." (with optional leading article) (golint)
    • Line 92: warning: comment on exported type EmbeddedObjectMeta should be of the form "EmbeddedObjectMeta ..." (with optional leading article) (golint)
    • Line 224: warning: comment on exported type ElasticsearchMetricSetList should be of the form "ElasticsearchMetricSetList ..." (with optional leading article) (golint)
    • es-operator/operator/autoscaler.go
    • Line 21: warning: exported type ScalingDirection should have comment or be unexported (golint)
    • Line 36: warning: exported const DOWN should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported type ScalingOperation should have comment or be unexported (golint)
    • Line 55: warning: exported type AutoScaler should have comment or be unexported (golint)
    • Line 64: warning: exported function NewAutoScaler should have comment or be unexported (golint)
    • Line 132: warning: comment on exported method AutoScaler.GetScalingOperation should be of the form "GetScalingOperation ..." (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!


misspell98%

Misspell Finds commonly misspelled English words