Preparing report...

Report for github.com/percona/percona-xtradb-cluster-operator

(v1.11.0)

A+    Excellent!    Found 19 issues across 71 files

Tweet

gofmt95%

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


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!


gocyclo77%

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/controller/pxc/users.go
    • Line 40: warning: cyclomatic complexity 34 of function (*ReconcilePerconaXtraDBCluster).reconcileUsers() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 25 of function (*ReconcilePerconaXtraDBCluster).manageSysUsers() is high (> 15) (gocyclo)
    • pkg/apis/pxc/v1/pxc_types.go
    • Line 574: warning: cyclomatic complexity 61 of function (*PerconaXtraDBCluster).CheckNSetDefaults() is high (> 15) (gocyclo)
    • Line 212: warning: cyclomatic complexity 46 of function (*PerconaXtraDBCluster).Validate() is high (> 15) (gocyclo)
    • Line 814: warning: cyclomatic complexity 20 of function (*PerconaXtraDBCluster).setProbesDefaults() is high (> 15) (gocyclo)
    • pkg/controller/pxc/version.go
    • Line 126: warning: cyclomatic complexity 33 of function (*ReconcilePerconaXtraDBCluster).ensurePXCVersion() is high (> 15) (gocyclo)
    • Line 34: warning: cyclomatic complexity 16 of function (*ReconcilePerconaXtraDBCluster).sheduleEnsurePXCVersion() is high (> 15) (gocyclo)
    • pkg/controller/pxc/tls.go
    • Line 64: warning: cyclomatic complexity 18 of function (*ReconcilePerconaXtraDBCluster).createSSLByCertManager() is high (> 15) (gocyclo)
    • Line 20: warning: cyclomatic complexity 16 of function (*ReconcilePerconaXtraDBCluster).reconcileSSL() is high (> 15) (gocyclo)
    • pkg/controller/pxc/upgrade.go
    • Line 29: warning: cyclomatic complexity 48 of function (*ReconcilePerconaXtraDBCluster).updatePod() is high (> 15) (gocyclo)
    • Line 223: warning: cyclomatic complexity 20 of function (*ReconcilePerconaXtraDBCluster).smartUpdate() is high (> 15) (gocyclo)
    • pkg/controller/pxc/controller.go
    • Line 526: warning: cyclomatic complexity 77 of function (*ReconcilePerconaXtraDBCluster).deploy() is high (> 15) (gocyclo)
    • Line 182: warning: cyclomatic complexity 63 of function (*ReconcilePerconaXtraDBCluster).Reconcile() is high (> 15) (gocyclo)
    • Line 834: warning: cyclomatic complexity 45 of function (*ReconcilePerconaXtraDBCluster).reconcileConfigMap() is high (> 15) (gocyclo)

ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


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!