Preparing report...

Report for github.com/kubism/backup-operator

A+    Excellent!    Found 28 issues across 53 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!


gocyclo100%

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.

No problems detected. Good job!


golint47%

Golint is a linter for Go source code.

    • backup-operator/pkg/testutil/helm_env.go
    • Line 30: warning: exported type HelmEnvConfig should have comment or be unexported (golint)
    • Line 36: warning: exported type HelmEnv should have comment or be unexported (golint)
    • Line 44: warning: exported function NewHelmEnv should have comment or be unexported (golint)
    • Line 67: warning: exported method HelmEnv.RepoAdd should have comment or be unexported (golint)
    • Line 74: warning: exported method HelmEnv.RepoUpdate should have comment or be unexported (golint)
    • Line 81: warning: exported method HelmEnv.Install should have comment or be unexported (golint)
    • Line 90: warning: exported method HelmEnv.Uninstall should have comment or be unexported (golint)
    • Line 99: warning: exported method HelmEnv.Close should have comment or be unexported (golint)
    • backup-operator/pkg/testutil/kind_env.go
    • Line 29: warning: exported type KindEnvConfig should have comment or be unexported (golint)
    • Line 34: warning: exported type KindEnv should have comment or be unexported (golint)
    • Line 43: warning: exported function NewKindEnv should have comment or be unexported (golint)
    • Line 78: warning: exported method KindEnv.LoadDockerImage should have comment or be unexported (golint)
    • Line 84: warning: exported method KindEnv.Close should have comment or be unexported (golint)
    • backup-operator/pkg/metrics/metrics_publisher.go
    • Line 29: warning: exported type MetricsPublisher should have comment or be unexported (golint)
    • Line 37: warning: exported function NewNopMetricsPublisher should have comment or be unexported (golint)
    • Line 41: warning: exported type MetricsPublisherConfig should have comment or be unexported (golint)
    • Line 53: warning: exported method MetricsPublisherConfig.WithURL should have comment or be unexported (golint)
    • Line 58: warning: exported method MetricsPublisherConfig.WithUsername should have comment or be unexported (golint)
    • Line 63: warning: exported method MetricsPublisherConfig.WithPassword should have comment or be unexported (golint)
    • Line 68: warning: exported method MetricsPublisherConfig.WithApp should have comment or be unexported (golint)
    • Line 73: warning: exported method MetricsPublisherConfig.Validate should have comment or be unexported (golint)
    • Line 80: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 96: warning: exported function NewMetricsPublisher should have comment or be unexported (golint)
    • backup-operator/pkg/controllers/cronjob_helper.go
    • Line 27: warning: exported const WorkerContainerName should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported var WorkerConfigFilePath should have comment or be unexported (golint)
    • Line 36: warning: exported function UpdateCronJobSpec should have comment or be unexported (golint)
    • backup-operator/pkg/backup/s3/s3_destination.go
    • Line 36: warning: exported type S3DestinationConf should have comment or be unexported (golint)
    • Line 48: warning: exported function NewS3Destination should have comment or be unexported (golint)
    • Line 91: warning: exported type S3Destination should have comment or be unexported (golint)
    • Line 102: warning: exported method S3Destination.Store should have comment or be unexported (golint)
    • Line 147: warning: exported method S3Destination.EnsureRetention should have comment or be unexported (golint)
    • backup-operator/pkg/backup/types.go
    • Line 23: warning: exported type Object should have comment or be unexported (golint)
    • Line 28: warning: exported type Destination should have comment or be unexported (golint)
    • Line 32: warning: exported type Source should have comment or be unexported (golint)
    • backup-operator/api/v1alpha1/consulbackupplan_types.go
    • Line 25: warning: exported const ConsulBackupPlanKind should have comment or be unexported (golint)
    • Line 26: warning: exported const ConsulBackupPlanWorkerCommand should have comment or be unexported (golint)
    • Line 56: warning: exported method ConsulBackupPlan.GetTypeMeta should have comment or be unexported (golint)
    • Line 60: warning: exported method ConsulBackupPlan.GetObjectMeta should have comment or be unexported (golint)
    • Line 64: warning: exported method ConsulBackupPlan.GetSpec should have comment or be unexported (golint)
    • Line 68: warning: exported method ConsulBackupPlan.GetStatus should have comment or be unexported (golint)
    • Line 72: warning: exported method ConsulBackupPlan.GetKind should have comment or be unexported (golint)
    • Line 76: warning: exported method ConsulBackupPlan.GetCmd should have comment or be unexported (golint)
    • Line 80: warning: exported method ConsulBackupPlan.GetSecretData should have comment or be unexported (golint)
    • Line 91: warning: exported method ConsulBackupPlan.New should have comment or be unexported (golint)
    • backup-operator/pkg/util/strings.go
    • Line 19: warning: exported function ContainsString should have comment or be unexported (golint)
    • Line 28: warning: exported function RemoveString should have comment or be unexported (golint)
    • Line 38: warning: exported function NilIfEmpty should have comment or be unexported (golint)
    • backup-operator/pkg/controllers/backupplan_controller.go
    • Line 58: warning: exported method BackupPlanReconciler.Reconcile should have comment or be unexported (golint)
    • Line 99: 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 113: 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 258: warning: exported method BackupPlanReconciler.SetupWithManager should have comment or be unexported (golint)
    • backup-operator/api/v1alpha1/mongodbbackupplan_types.go
    • Line 25: warning: exported const MongoDBBackupPlanKind should have comment or be unexported (golint)
    • Line 26: warning: exported const MongoDBBackupPlanWorkerCommand should have comment or be unexported (golint)
    • Line 48: warning: exported method MongoDBBackupPlan.GetTypeMeta should have comment or be unexported (golint)
    • Line 52: warning: exported method MongoDBBackupPlan.GetObjectMeta should have comment or be unexported (golint)
    • Line 56: warning: exported method MongoDBBackupPlan.GetSpec should have comment or be unexported (golint)
    • Line 60: warning: exported method MongoDBBackupPlan.GetStatus should have comment or be unexported (golint)
    • Line 64: warning: exported method MongoDBBackupPlan.GetKind should have comment or be unexported (golint)
    • Line 68: warning: exported method MongoDBBackupPlan.GetCmd should have comment or be unexported (golint)
    • Line 72: warning: exported method MongoDBBackupPlan.GetSecretData should have comment or be unexported (golint)
    • Line 83: warning: exported method MongoDBBackupPlan.New should have comment or be unexported (golint)
    • backup-operator/pkg/testutil/mongodb.go
    • Line 31: warning: exported function WaitForMongoDB should have comment or be unexported (golint)
    • Line 50: warning: exported function InsertTestData should have comment or be unexported (golint)
    • Line 71: warning: exported function FindTestData should have comment or be unexported (golint)
    • backup-operator/pkg/backup/s3/s3_source.go
    • Line 37: warning: exported type S3SourceConf should have comment or be unexported (golint)
    • Line 49: warning: exported function NewS3Source should have comment or be unexported (golint)
    • Line 93: warning: exported type S3Source should have comment or be unexported (golint)
    • Line 104: warning: exported method S3Source.Stream 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!


misspell98%

Misspell Finds commonly misspelled English words