Preparing report...

Report for github.com/oracle/mysql-operator

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


gocyclo96%

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.


golint81%

Golint is a linter for Go source code.

    • mysql-operator/pkg/util/test/test_backup.go
    • Line 24: warning: exported type TestBackup should have comment or be unexported (golint)
    • Line 28: warning: exported function NewTestBackup should have comment or be unexported (golint)
    • Line 56: warning: exported method TestBackup.WithNamespace should have comment or be unexported (golint)
    • Line 61: warning: exported method TestBackup.WithName should have comment or be unexported (golint)
    • Line 66: warning: exported method TestBackup.WithLabel should have comment or be unexported (golint)
    • mysql-operator/pkg/util/test/test_backupschedule.go
    • Line 26: warning: exported type TestBackupSchedule should have comment or be unexported (golint)
    • Line 30: warning: exported function NewTestBackupSchedule should have comment or be unexported (golint)
    • Line 62: warning: exported method TestBackupSchedule.WithCronSchedule should have comment or be unexported (golint)
    • Line 67: warning: exported method TestBackupSchedule.WithLastBackupTime should have comment or be unexported (golint)
    • Line 73: warning: exported method TestBackupSchedule.WithLabel should have comment or be unexported (golint)
    • mysql-operator/test/e2e/framework/util.go
    • Line 28: warning: should not use dot imports (golint)
    • Line 29: warning: should not use dot imports (golint)
    • Line 50: warning: exported function Logf should have comment or be unexported (golint)
    • Line 54: warning: exported function Failf should have comment or be unexported (golint)
    • Line 58: warning: exported function ExpectNoError should have comment or be unexported (golint)
    • Line 105: warning: exported function NewKubectlCommand should have comment or be unexported (golint)
    • Line 247: warning: comment on exported function IsPodReadyConditionTrue should be of the form "IsPodReadyConditionTrue ..." (golint)
    • Line 253: warning: comment on exported function GetPodReadyCondition should be of the form "GetPodReadyCondition ..." (golint)
    • mysql-operator/pkg/generated/clientset/versioned/typed/mysql/v1alpha1/mysql_client.go
    • Line 24: warning: exported type MySQLV1alpha1Interface should have comment or be unexported (golint)
    • Line 37: warning: exported method MySQLV1alpha1Client.Backups should have comment or be unexported (golint)
    • Line 41: warning: exported method MySQLV1alpha1Client.BackupSchedules should have comment or be unexported (golint)
    • Line 45: warning: exported method MySQLV1alpha1Client.Clusters should have comment or be unexported (golint)
    • Line 49: warning: exported method MySQLV1alpha1Client.Restores should have comment or be unexported (golint)
    • mysql-operator/pkg/apis/mysql/v1alpha1/zz_generated.deepcopy.go
    • Line 50: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 126: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 205: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 304: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 355: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 590: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 641: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (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!