Preparing report...

Report for github.com/backube/volsync

A    Great!    Found 46 issues across 78 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!


gocyclo97%

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.


golint48%

Golint is a linter for Go source code.

    • volsync/pkg/cmd/create_replication.go
    • Line 51: warning: exported type SetupReplicationOptions should have comment or be unexported (golint)
    • Line 73: warning: exported function NewSetupReplicationOptions should have comment or be unexported (golint)
    • Line 79: warning: exported function NewCmdVolSyncStartReplication should have comment or be unexported (golint)
    • Line 147: warning: exported method SetupReplicationOptions.Bind should have comment or be unexported (golint)
    • Line 160: warning: exported method SetupReplicationOptions.Complete should have comment or be unexported (golint)
    • Line 179: warning: comment on exported method SetupReplicationOptions.Validate should be of the form "Validate ..." (golint)
    • Line 230: warning: comment on exported method SetupReplicationOptions.StartReplication should be of the form "StartReplication ..." (golint)
    • Line 395: warning: exported method SetupReplicationOptions.GetSourcePVC should have comment or be unexported (golint)
    • Line 449: warning: comment on exported method SetupReplicationOptions.CreateDestination should be of the form "CreateDestination ..." (golint)
    • volsync/test-kuttl/pkg/cmd/sync_secret.go
    • Line 17: warning: exported type SSHKeysSecretOptions should have comment or be unexported (golint)
    • Line 23: warning: comment on exported method SSHKeysSecretOptions.Bind should be of the form "Bind ..." (golint)
    • Line 37: warning: exported method SSHKeysSecretOptions.SyncSSHSecret should have comment or be unexported (golint)
    • volsync/controllers/replicationdestination_controller.go
    • Line 84: warning: comment on exported method ReplicationDestinationReconciler.Reconcile should be of the form "Reconcile ..." (golint)
    • Line 223: warning: exported method ReplicationDestinationReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 396: warning: comment on exported function RunRsyncDestReconciler should be of the form "RunRsyncDestReconciler ..." (golint)
    • volsync/controllers/utils/utils.go
    • Line 31: warning: exported function NameFor should have comment or be unexported (golint)
    • Line 38: warning: exported function GetAndValidateSecret should have comment or be unexported (golint)
    • Line 64: warning: exported function EnvFromSecret should have comment or be unexported (golint)
    • volsync/pkg/cmd/set_replication.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 51: warning: exported type FinalizeOptions should have comment or be unexported (golint)
    • Line 63: warning: exported function NewFinalizeOptions should have comment or be unexported (golint)
    • Line 69: warning: exported function NewCmdVolSyncSetReplication should have comment or be unexported (golint)
    • Line 110: warning: exported method FinalizeOptions.Bind should have comment or be unexported (golint)
    • Line 123: warning: exported method FinalizeOptions.Complete should have comment or be unexported (golint)
    • Line 136: warning: comment on exported method FinalizeOptions.SetReplication should be of the form "SetReplication ..." (golint)
    • volsync/pkg/cmd/sync_secret.go
    • Line 17: warning: exported type SSHKeysSecretOptions should have comment or be unexported (golint)
    • Line 23: warning: comment on exported method SSHKeysSecretOptions.Bind should be of the form "Bind ..." (golint)
    • Line 37: warning: exported method SSHKeysSecretOptions.SyncSSHSecret should have comment or be unexported (golint)
    • volsync/test-kuttl/pkg/cmd/set_replication.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 51: warning: exported type FinalizeOptions should have comment or be unexported (golint)
    • Line 63: warning: exported function NewFinalizeOptions should have comment or be unexported (golint)
    • Line 69: warning: exported function NewCmdVolSyncSetReplication should have comment or be unexported (golint)
    • Line 110: warning: exported method FinalizeOptions.Bind should have comment or be unexported (golint)
    • Line 123: warning: exported method FinalizeOptions.Complete should have comment or be unexported (golint)
    • Line 136: warning: comment on exported method FinalizeOptions.SetReplication should be of the form "SetReplication ..." (golint)
    • volsync/test-kuttl/pkg/cmd/volsync.go
    • Line 41: warning: exported var VolSyncVersion should have comment or be unexported (golint)
    • Line 44: warning: exported type ReplicationOptions should have comment or be unexported (golint)
    • Line 51: warning: exported type Config should have comment or be unexported (golint)
    • Line 55: warning: exported type VolSyncSourceOptions should have comment or be unexported (golint)
    • Line 73: warning: exported type VolSyncDestinationOptions should have comment or be unexported (golint)
    • Line 91: warning: comment on exported method VolSyncSourceOptions.Bind should be of the form "Bind ..." (golint)
    • Line 109: warning: comment on exported method VolSyncDestinationOptions.Bind should be of the form "Bind ..." (golint)
    • Line 181: warning: exported method Config.Bind should have comment or be unexported (golint)
    • Line 189: warning: exported method ReplicationOptions.Bind should have comment or be unexported (golint)
    • Line 217: warning: exported method ReplicationOptions.Complete should have comment or be unexported (golint)
    • Line 229: warning: comment on exported method VolSyncSourceOptions.Complete should be of the form "Complete ..." (golint)
    • Line 261: warning: comment on exported method VolSyncDestinationOptions.Complete should be of the form "Complete ..." (golint)
    • volsync/api/v1alpha1/replicationdestination_types.go
    • Line 34: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 63: warning: exported type ReplicationDestinationVolumeOptions should have comment or be unexported (golint)
    • Line 89: warning: exported type ReplicationDestinationRsyncSpec should have comment or be unexported (golint)
    • Line 163: warning: exported type ReplicationDestinationRsyncStatus should have comment or be unexported (golint)
    • volsync/controllers/mover/restic/mover.go
    • Line 78: warning: exported method Mover.Name should have comment or be unexported (golint)
    • Line 80: warning: exported method Mover.Synchronize should have comment or be unexported (golint)
    • Line 130: warning: exported method Mover.Cleanup should have comment or be unexported (golint)
    • volsync/pkg/cmd/continue_replication.go
    • Line 39: warning: exported function NewCmdVolSyncContinueReplication should have comment or be unexported (golint)
    • Line 60: warning: comment on exported method FinalizeOptions.Continue should be of the form "Continue ..." (golint)
    • volsync/pkg/cmd/destination.go
    • Line 16: warning: exported type DestinationOptions should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method DestinationOptions.Bind should be of the form "Bind ..." (golint)
    • volsync/controllers/utils/reconcile.go
    • Line 22: warning: comment on exported type ReconcileFunc should be of the form "ReconcileFunc ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported function ReconcileBatch should be of the form "ReconcileBatch ..." (golint)
    • volsync/controllers/volumehandler/volumehandler.go
    • Line 46: warning: exported type VolumeHandler should have comment or be unexported (golint)
    • Line 106: warning: exported method VolumeHandler.EnsureNewPVC should have comment or be unexported (golint)
    • Line 156: warning: exported method VolumeHandler.SetAccessModes should have comment or be unexported (golint)
    • Line 160: warning: exported method VolumeHandler.GetAccessModes should have comment or be unexported (golint)
    • volsync/controllers/mover/restic/builder.go
    • Line 38: warning: exported type Builder should have comment or be unexported (golint)
    • Line 42: warning: exported function Register should have comment or be unexported (golint)
    • Line 48: warning: exported method Builder.FromSource should have comment or be unexported (golint)
    • Line 87: warning: exported method Builder.FromDestination should have comment or be unexported (golint)
    • volsync/test-kuttl/api/v1alpha1/replicationdestination_types.go
    • Line 34: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 63: warning: exported type ReplicationDestinationVolumeOptions should have comment or be unexported (golint)
    • Line 89: warning: exported type ReplicationDestinationRsyncSpec should have comment or be unexported (golint)
    • Line 163: warning: exported type ReplicationDestinationRsyncStatus should have comment or be unexported (golint)
    • volsync/test-kuttl/controllers/volumehandler/new.go
    • Line 94: warning: exported function AccessModes should have comment or be unexported (golint)
    • Line 100: warning: exported function CopyMethod should have comment or be unexported (golint)
    • Line 106: warning: exported function Capacity should have comment or be unexported (golint)
    • Line 112: warning: exported function StorageClassName should have comment or be unexported (golint)
    • Line 118: warning: exported function VolumeSnapshotClassName should have comment or be unexported (golint)
    • volsync/test-kuttl/controllers/volumehandler/volumehandler.go
    • Line 46: warning: exported type VolumeHandler should have comment or be unexported (golint)
    • Line 106: warning: exported method VolumeHandler.EnsureNewPVC should have comment or be unexported (golint)
    • Line 156: warning: exported method VolumeHandler.SetAccessModes should have comment or be unexported (golint)
    • Line 160: warning: exported method VolumeHandler.GetAccessModes should have comment or be unexported (golint)
    • volsync/test-kuttl/pkg/cmd/create_replication.go
    • Line 51: warning: exported type SetupReplicationOptions should have comment or be unexported (golint)
    • Line 73: warning: exported function NewSetupReplicationOptions should have comment or be unexported (golint)
    • Line 79: warning: exported function NewCmdVolSyncStartReplication should have comment or be unexported (golint)
    • Line 147: warning: exported method SetupReplicationOptions.Bind should have comment or be unexported (golint)
    • Line 160: warning: exported method SetupReplicationOptions.Complete should have comment or be unexported (golint)
    • Line 179: warning: comment on exported method SetupReplicationOptions.Validate should be of the form "Validate ..." (golint)
    • Line 230: warning: comment on exported method SetupReplicationOptions.StartReplication should be of the form "StartReplication ..." (golint)
    • Line 395: warning: exported method SetupReplicationOptions.GetSourcePVC should have comment or be unexported (golint)
    • Line 449: warning: comment on exported method SetupReplicationOptions.CreateDestination should be of the form "CreateDestination ..." (golint)
    • volsync/controllers/utils/sahandler.go
    • Line 38: warning: exported type SAHandler should have comment or be unexported (golint)
    • Line 47: warning: exported function NewSAHandler should have comment or be unexported (golint)
    • Line 56: warning: exported method SAHandler.Reconcile should have comment or be unexported (golint)
    • volsync/api/v1alpha1/replicationsource_types.go
    • Line 34: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 75: warning: exported type ReplicationSourceVolumeOptions should have comment or be unexported (golint)
    • Line 96: warning: exported type ReplicationSourceRsyncSpec should have comment or be unexported (golint)
    • Line 210: warning: exported type ReplicationSourceRsyncStatus should have comment or be unexported (golint)
    • volsync/test-kuttl/controllers/utils/utils.go
    • Line 31: warning: exported function NameFor should have comment or be unexported (golint)
    • Line 38: warning: exported function GetAndValidateSecret should have comment or be unexported (golint)
    • Line 64: warning: exported function EnvFromSecret should have comment or be unexported (golint)
    • volsync/pkg/cmd/remove_replication.go
    • Line 42: warning: exported function NewCmdVolSyncRemoveReplication should have comment or be unexported (golint)
    • Line 63: warning: comment on exported method FinalizeOptions.RemoveReplication should be of the form "RemoveReplication ..." (golint)
    • volsync/pkg/cmd/volsync.go
    • Line 41: warning: exported var VolSyncVersion should have comment or be unexported (golint)
    • Line 44: warning: exported type ReplicationOptions should have comment or be unexported (golint)
    • Line 51: warning: exported type Config should have comment or be unexported (golint)
    • Line 55: warning: exported type VolSyncSourceOptions should have comment or be unexported (golint)
    • Line 73: warning: exported type VolSyncDestinationOptions should have comment or be unexported (golint)
    • Line 91: warning: comment on exported method VolSyncSourceOptions.Bind should be of the form "Bind ..." (golint)
    • Line 109: warning: comment on exported method VolSyncDestinationOptions.Bind should be of the form "Bind ..." (golint)
    • Line 181: warning: exported method Config.Bind should have comment or be unexported (golint)
    • Line 189: warning: exported method ReplicationOptions.Bind should have comment or be unexported (golint)
    • Line 217: warning: exported method ReplicationOptions.Complete should have comment or be unexported (golint)
    • Line 229: warning: comment on exported method VolSyncSourceOptions.Complete should be of the form "Complete ..." (golint)
    • Line 261: warning: comment on exported method VolSyncDestinationOptions.Complete should be of the form "Complete ..." (golint)
    • volsync/test-kuttl/controllers/replicationdestination_controller.go
    • Line 84: warning: comment on exported method ReplicationDestinationReconciler.Reconcile should be of the form "Reconcile ..." (golint)
    • Line 223: warning: exported method ReplicationDestinationReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 396: warning: comment on exported function RunRsyncDestReconciler should be of the form "RunRsyncDestReconciler ..." (golint)
    • volsync/test-kuttl/controllers/replicationsource_controller.go
    • Line 74: warning: comment on exported method ReplicationSourceReconciler.Reconcile should be of the form "Reconcile ..." (golint)
    • Line 213: warning: exported method ReplicationSourceReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 395: warning: comment on exported function RunRsyncSrcReconciler should be of the form "RunRsyncSrcReconciler ..." (golint)
    • volsync/controllers/volumehandler/new.go
    • Line 94: warning: exported function AccessModes should have comment or be unexported (golint)
    • Line 100: warning: exported function CopyMethod should have comment or be unexported (golint)
    • Line 106: warning: exported function Capacity should have comment or be unexported (golint)
    • Line 112: warning: exported function StorageClassName should have comment or be unexported (golint)
    • Line 118: warning: exported function VolumeSnapshotClassName should have comment or be unexported (golint)
    • volsync/test-kuttl/controllers/mover/restic/builder.go
    • Line 38: warning: exported type Builder should have comment or be unexported (golint)
    • Line 42: warning: exported function Register should have comment or be unexported (golint)
    • Line 48: warning: exported method Builder.FromSource should have comment or be unexported (golint)
    • Line 87: warning: exported method Builder.FromDestination should have comment or be unexported (golint)
    • volsync/controllers/replicationsource_controller.go
    • Line 74: warning: comment on exported method ReplicationSourceReconciler.Reconcile should be of the form "Reconcile ..." (golint)
    • Line 213: warning: exported method ReplicationSourceReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 395: warning: comment on exported function RunRsyncSrcReconciler should be of the form "RunRsyncSrcReconciler ..." (golint)
    • volsync/test-kuttl/api/v1alpha1/replicationsource_types.go
    • Line 34: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 75: warning: exported type ReplicationSourceVolumeOptions should have comment or be unexported (golint)
    • Line 96: warning: exported type ReplicationSourceRsyncSpec should have comment or be unexported (golint)
    • Line 210: warning: exported type ReplicationSourceRsyncStatus should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (signal: killed)


misspell92%

Misspell Finds commonly misspelled English words