Preparing report...

Report for kubedb.dev/apimachinery

(v0.52.0)

A+    Excellent!    Found 54 issues across 1112 files

Tweet

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!


gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo95%

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.

    • pkg/phase/phase.go
    • Line 150: warning: cyclomatic complexity 17 of function PhaseFromConditionV1() is high (> 15) (gocyclo)
    • Line 59: warning: cyclomatic complexity 17 of function PhaseFromCondition() is high (> 15) (gocyclo)
    • apis/kubedb/v1alpha2/zz_generated.conversion.go
    • Line 46: warning: cyclomatic complexity 193 of function RegisterConversions() is high (> 15) (gocyclo)
    • Line 1266: warning: cyclomatic complexity 21 of function autoConvert_v1alpha2_ElasticsearchClusterTopology_To_v1_ElasticsearchClusterTopology() is high (> 15) (gocyclo)
    • Line 1362: warning: cyclomatic complexity 21 of function autoConvert_v1_ElasticsearchClusterTopology_To_v1alpha2_ElasticsearchClusterTopology() is high (> 15) (gocyclo)
    • apis/kubedb/v1alpha2/zz_generated.deepcopy.go
    • Line 1371: warning: cyclomatic complexity 19 of function (*ElasticsearchSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • Line 3149: warning: cyclomatic complexity 19 of function (*MongoDBSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • Line 4256: warning: cyclomatic complexity 19 of function (*PostgresSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • Line 5676: warning: cyclomatic complexity 17 of function (*SolrSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • apis/kubedb/v1/elasticsearch_helpers.go
    • Line 449: warning: cyclomatic complexity 96 of function (*Elasticsearch).SetDefaults() is high (> 15) (gocyclo)
    • Line 726: warning: cyclomatic complexity 26 of function (*Elasticsearch).SetDefaultInternalUsersAndRoleMappings() is high (> 15) (gocyclo)
    • apis/kubedb/v1/zz_generated.deepcopy.go
    • Line 485: warning: cyclomatic complexity 19 of function (*ElasticsearchSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • Line 2557: warning: cyclomatic complexity 19 of function (*PostgresSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • Line 1639: warning: cyclomatic complexity 19 of function (*MongoDBSpec).DeepCopyInto() is high (> 15) (gocyclo)
    • apis/kubedb/v1/mongodb_helpers.go
    • Line 619: warning: cyclomatic complexity 29 of function (*MongoDB).SetDefaults() is high (> 15) (gocyclo)
    • Line 828: warning: cyclomatic complexity 18 of function (*MongoDB).SetTLSDefaults() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!