Preparing report...

Report for github.com/percona/percona-postgresql-operator

(v1.2.0)

A+    Excellent!    Found 34 issues across 360 files

Tweet

gofmt99%

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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo90%

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.

    • internal/apiserver/clusterservice/clusterimpl.go
    • Line 1846: warning: cyclomatic complexity 87 of function UpdateCluster() is high (> 15) (gocyclo)
    • Line 535: warning: cyclomatic complexity 80 of function CreateCluster() is high (> 15) (gocyclo)
    • Line 1154: warning: cyclomatic complexity 59 of function getClusterParams() is high (> 15) (gocyclo)
    • Line 2454: warning: cyclomatic complexity 24 of function validateClusterTLS() is high (> 15) (gocyclo)
    • Line 339: warning: cyclomatic complexity 21 of function TestCluster() is high (> 15) (gocyclo)
    • Line 2602: warning: cyclomatic complexity 19 of function validateDataSourceParms() is high (> 15) (gocyclo)
    • internal/operator/cluster/upgrade.go
    • Line 541: warning: cyclomatic complexity 26 of function preparePgclusterForUpgrade() is high (> 15) (gocyclo)
    • Line 462: warning: cyclomatic complexity 16 of function recreateBackrestRepoSecret() is high (> 15) (gocyclo)
    • Line 918: warning: cyclomatic complexity 16 of function updateClusterConfig() is high (> 15) (gocyclo)
    • internal/config/pgoconfig.go
    • Line 525: warning: cyclomatic complexity 42 of function (*PgoConfig).GetConfig() is high (> 15) (gocyclo)
    • Line 286: warning: cyclomatic complexity 31 of function (*PgoConfig).Validate() is high (> 15) (gocyclo)
    • cmd/pgo/cmd/cluster.go
    • Line 255: warning: cyclomatic complexity 31 of function createCluster() is high (> 15) (gocyclo)
    • Line 728: warning: cyclomatic complexity 27 of function updateCluster() is high (> 15) (gocyclo)
    • Line 162: warning: cyclomatic complexity 17 of function printCluster() is high (> 15) (gocyclo)
    • Line 610: warning: cyclomatic complexity 16 of function getClusterTolerations() 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!