Preparing report...

Report for github.com/easymile/postgresql-operator

A+    Excellent!    Found 17 issues across 29 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.


golint41%

Golint is a linter for Go source code.

    • postgresql-operator/pkg/apis/postgresql/v1alpha1/postgresqlengineconfiguration_types.go
    • Line 10: warning: exported type ProviderType should have comment or be unexported (golint)
    • Line 12: warning: exported const NoProvider should have comment or be unexported (golint)
    • Line 13: warning: exported const AWSProvider should have comment or be unexported (golint)
    • Line 14: warning: exported const AzureProvider should have comment or be unexported (golint)
    • Line 43: warning: exported type EngineStatusPhase should have comment or be unexported (golint)
    • Line 45: warning: exported const EngineNoPhase should have comment or be unexported (golint)
    • Line 46: warning: exported const EngineFailedPhase should have comment or be unexported (golint)
    • Line 47: warning: exported const EngineValidatedPhase should have comment or be unexported (golint)
    • postgresql-operator/pkg/apis/postgresql/v1alpha1/postgresqluser_types.go
    • Line 10: warning: exported type PrivilegesSpecEnum should have comment or be unexported (golint)
    • Line 12: warning: exported const OwnerPrivilege should have comment or be unexported (golint)
    • Line 13: warning: exported const ReaderPrivilege should have comment or be unexported (golint)
    • Line 14: warning: exported const WriterPrivilege should have comment or be unexported (golint)
    • Line 42: warning: exported type UserStatusPhase should have comment or be unexported (golint)
    • Line 44: warning: exported const UserNoPhase should have comment or be unexported (golint)
    • Line 45: warning: exported const UserFailedPhase should have comment or be unexported (golint)
    • Line 46: warning: exported const UserCreatedPhase should have comment or be unexported (golint)
    • postgresql-operator/pkg/controller/utils/utils.go
    • Line 17: warning: exported function CalculateHash should have comment or be unexported (golint)
    • Line 30: warning: exported function CreatePgInstance should have comment or be unexported (golint)
    • Line 48: warning: exported function FindSecretPgEngineCfg should have comment or be unexported (golint)
    • Line 54: warning: exported function CloseDatabaseSavedPoolsForName should have comment or be unexported (golint)
    • Line 68: warning: exported function CreateNameKeyForSavedPools should have comment or be unexported (golint)
    • Line 72: warning: exported function FindPgEngineCfg should have comment or be unexported (golint)
    • Line 89: warning: exported function FindPgDatabase should have comment or be unexported (golint)
    • postgresql-operator/pkg/apis/postgresql/v1alpha1/postgresqldatabase_types.go
    • Line 40: warning: exported type DatabaseModulesList should have comment or be unexported (golint)
    • Line 53: warning: exported type DatabaseStatusPhase should have comment or be unexported (golint)
    • Line 55: warning: exported const DatabaseNoPhase should have comment or be unexported (golint)
    • Line 56: warning: exported const DatabaseFailedPhase should have comment or be unexported (golint)
    • Line 57: warning: exported const DatabaseCreatedPhase should have comment or be unexported (golint)
    • postgresql-operator/pkg/postgres/postgres.go
    • Line 11: warning: exported const MaxIdentifierLength should have comment or be unexported (golint)
    • Line 13: warning: exported type PG should have comment or be unexported (golint)
    • Line 52: warning: exported function NewPG should have comment or be unexported (golint)
    • Line 127: warning: exported function TemplatePostgresqlURLWithArgs should have comment or be unexported (golint)
    • Line 131: warning: exported function TemplatePostgresqlURL should have comment or be unexported (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!