Preparing report...

Report for github.com/CrunchyData/postgres-operator

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


gocyclo89%

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.

    • postgres-operator/internal/controller/postgrescluster/pgbackrest.go
    • Line 1775: warning: cyclomatic complexity 40 of function (*Reconciler).reconcileManualBackup() is high (> 15) (gocyclo)
    • Line 1996: warning: cyclomatic complexity 31 of function (*Reconciler).reconcileReplicaCreateBackup() is high (> 15) (gocyclo)
    • Line 1338: warning: cyclomatic complexity 25 of function (*Reconciler).reconcilePostgresClusterDataSource() is high (> 15) (gocyclo)
    • Line 734: warning: cyclomatic complexity 24 of function (*Reconciler).observeRestoreEnv() is high (> 15) (gocyclo)
    • Line 356: warning: cyclomatic complexity 24 of function unstructuredToRepoResources() is high (> 15) (gocyclo)
    • Line 980: warning: cyclomatic complexity 23 of function (*Reconciler).reconcileRestoreJob() is high (> 15) (gocyclo)
    • Line 2398: warning: cyclomatic complexity 21 of function getRepoVolumeStatus() is high (> 15) (gocyclo)
    • Line 250: warning: cyclomatic complexity 20 of function (*Reconciler).cleanupRepoResources() is high (> 15) (gocyclo)
    • Line 859: warning: cyclomatic complexity 18 of function (*Reconciler).prepareForRestore() is high (> 15) (gocyclo)
    • Line 2542: warning: cyclomatic complexity 16 of function (*Reconciler).reconcilePGBackRestCronJob() is high (> 15) (gocyclo)
    • Line 2225: warning: cyclomatic complexity 16 of function (*Reconciler).reconcileStanzaCreate() is high (> 15) (gocyclo)
    • Line 1194: warning: cyclomatic complexity 16 of function (*Reconciler).reconcilePGBackRest() is high (> 15) (gocyclo)
    • postgres-operator/internal/controller/postgrescluster/postgres.go
    • Line 143: warning: cyclomatic complexity 17 of function (*Reconciler).reconcilePostgresDatabases() is high (> 15) (gocyclo)
    • Line 272: warning: cyclomatic complexity 17 of function (*Reconciler).reconcilePostgresUserSecrets() is high (> 15) (gocyclo)
    • Line 379: warning: cyclomatic complexity 17 of function (*Reconciler).reconcilePostgresUsersInPostgreSQL() is high (> 15) (gocyclo)
    • postgres-operator/internal/controller/postgrescluster/pgbackrest_test.go
    • Line 174: warning: cyclomatic complexity 59 of function TestReconcilePGBackRest() is high (> 15) (gocyclo)
    • Line 3041: warning: cyclomatic complexity 20 of function TestReconcileScheduledBackups() is high (> 15) (gocyclo)
    • Line 923: warning: cyclomatic complexity 20 of function TestReconcileReplicaCreateBackup() is high (> 15) (gocyclo)
    • Line 1095: warning: cyclomatic complexity 19 of function TestReconcileManualBackup() is high (> 15) (gocyclo)
    • Line 1998: warning: cyclomatic complexity 17 of function TestReconcilePostgresClusterDataSource() is high (> 15) (gocyclo)

golint94%

Golint is a linter for Go source code.


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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!