Preparing report...

Report for github.com/openshift/openshift-azure

A+    Excellent!    Found 216 issues across 635 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!


gocyclo90%

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.

    • openshift-azure/pkg/sync/v21/client.go
    • Line 274: warning: cyclomatic complexity 20 of function (*sync).isReconcileProtected() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 20 of function (*sync).write() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 17 of function (*sync).deleteOrphans() is high (> 15) (gocyclo)
    • openshift-azure/pkg/sync/v19/client.go
    • Line 274: warning: cyclomatic complexity 20 of function (*sync).isReconcileProtected() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 20 of function (*sync).write() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 17 of function (*sync).deleteOrphans() is high (> 15) (gocyclo)
    • openshift-azure/pkg/sync/v17/client.go
    • Line 274: warning: cyclomatic complexity 20 of function (*sync).isReconcileProtected() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 20 of function (*sync).write() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 17 of function (*sync).deleteOrphans() is high (> 15) (gocyclo)
    • openshift-azure/pkg/sync/v20/client.go
    • Line 274: warning: cyclomatic complexity 20 of function (*sync).isReconcileProtected() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 20 of function (*sync).write() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 17 of function (*sync).deleteOrphans() is high (> 15) (gocyclo)
    • openshift-azure/pkg/sync/v22/client.go
    • Line 274: warning: cyclomatic complexity 20 of function (*sync).isReconcileProtected() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 20 of function (*sync).write() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 17 of function (*sync).deleteOrphans() is high (> 15) (gocyclo)
    • openshift-azure/pkg/sync/v16/client.go
    • Line 274: warning: cyclomatic complexity 20 of function (*sync).isReconcileProtected() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 20 of function (*sync).write() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 17 of function (*sync).deleteOrphans() is high (> 15) (gocyclo)
    • openshift-azure/pkg/sync/v15/client.go
    • Line 271: warning: cyclomatic complexity 20 of function (*sync).isReconcileProtected() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 18 of function (*sync).write() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 17 of function (*sync).deleteOrphans() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • openshift-azure/pkg/sync/sync.go
    • Line 20: warning: exported type Interface should have comment or be unexported (golint)
    • Line 27: warning: exported function New should have comment or be unexported (golint)
    • Line 52: warning: exported function AssetNames should have comment or be unexported (golint)
    • Line 73: warning: exported function Asset should have comment or be unexported (golint)
    • openshift-azure/pkg/api/deepcopy.go
    • Line 75: warning: exported method OpenShiftManagedCluster.DeepCopy should have comment or be unexported (golint)
    • Line 80: warning: exported method Config.DeepCopy should have comment or be unexported (golint)
    • openshift-azure/test/clients/openshift/client.go
    • Line 29: warning: exported type Client should have comment or be unexported (golint)
    • Line 84: warning: exported function NewAdminClient should have comment or be unexported (golint)
    • Line 93: warning: exported function NewCustomerAdminClient should have comment or be unexported (golint)
    • Line 102: warning: exported function NewEndUserClient should have comment or be unexported (golint)
    • Line 111: warning: exported type ClientSet should have comment or be unexported (golint)
    • openshift-azure/pkg/arm/v19/derive.go
    • Line 18: warning: exported type DockerConfigJson should have comment or be unexported (golint)
    • Line 22: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type DockerConfigEntry should have comment or be unexported (golint)
    • openshift-azure/pkg/util/roundtrippers/retrying.go
    • Line 64: warning: error var timerExpired should have name of the form errFoo (golint)
    • Line 66: warning: exported type RetryingRoundTripper should have comment or be unexported (golint)
    • Line 73: warning: comment on exported function NewRetryingRoundTripper should be of the form "NewRetryingRoundTripper ..." (golint)
    • Line 90: warning: exported method RetryingRoundTripper.RoundTrip should have comment or be unexported (golint)
    • openshift-azure/test/e2e/standard/sanitychecker.go
    • Line 22: warning: exported type TestError should have comment or be unexported (golint)
    • Line 33: warning: exported type DeepTestInterface should have comment or be unexported (golint)
    • Line 40: warning: exported type SanityChecker should have comment or be unexported (golint)
    • Line 73: warning: exported method SanityChecker.CreateTestApp should have comment or be unexported (golint)
    • Line 128: warning: exported method SanityChecker.ValidateTestApp should have comment or be unexported (golint)
    • Line 151: warning: exported method SanityChecker.ValidateCluster should have comment or be unexported (golint)
    • Line 216: warning: exported method SanityChecker.DeleteTestApp should have comment or be unexported (golint)
    • Line 227: warning: exported method SanityChecker.CreateProject should have comment or be unexported (golint)
    • Line 240: warning: exported method SanityChecker.DeleteProject should have comment or be unexported (golint)
    • openshift-azure/pkg/arm/v17/derive.go
    • Line 18: warning: exported type DockerConfigJson should have comment or be unexported (golint)
    • Line 22: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type DockerConfigEntry should have comment or be unexported (golint)
    • openshift-azure/pkg/cluster/etcdrestore.go
    • Line 13: warning: exported method Upgrade.EtcdListBackups should have comment or be unexported (golint)
    • Line 27: warning: exported method Upgrade.EtcdRestoreDeleteMasterScaleSet should have comment or be unexported (golint)
    • Line 36: warning: exported method Upgrade.EtcdRestoreDeleteMasterScaleSetHashes should have comment or be unexported (golint)
    • openshift-azure/pkg/util/tls/marshal.go
    • Line 15: warning: exported function CertAsBytes should have comment or be unexported (golint)
    • Line 33: warning: exported function CertChainAsBytes should have comment or be unexported (golint)
    • Line 37: warning: exported function PrivateKeyAsBytes should have comment or be unexported (golint)
    • Line 54: warning: exported function PublicKeyAsBytes should have comment or be unexported (golint)
    • Line 76: warning: exported function SSHPublicKeyAsString should have comment or be unexported (golint)
    • Line 125: warning: exported function ParsePrivateKey should have comment or be unexported (golint)
    • openshift-azure/pkg/util/azureclient/fake/storage/container.go
    • Line 9: warning: exported type FakeContainerClient should have comment or be unexported (golint)
    • Line 14: warning: exported method FakeContainerClient.CreateIfNotExists should have comment or be unexported (golint)
    • Line 22: warning: exported method FakeContainerClient.GetBlobReference should have comment or be unexported (golint)
    • Line 26: warning: exported method FakeContainerClient.Exists should have comment or be unexported (golint)
    • Line 31: warning: exported method FakeContainerClient.ListBlobs should have comment or be unexported (golint)
    • openshift-azure/pkg/cluster/kubeclient/ready.go
    • Line 16: warning: exported method Kubeclientset.WaitForReadyMaster should have comment or be unexported (golint)
    • Line 39: warning: exported method Kubeclientset.WaitForReadyWorker should have comment or be unexported (golint)
    • Line 43: warning: exported method Kubeclientset.WaitForReadySyncPod should have comment or be unexported (golint)
    • openshift-azure/pkg/util/azureclient/fake/storage/blob.go
    • Line 12: warning: exported type FakeBlobClient should have comment or be unexported (golint)
    • Line 23: warning: exported method FakeBlobClient.CreateBlockBlobFromReader should have comment or be unexported (golint)
    • Line 33: warning: exported method FakeBlobClient.CreateBlockBlob should have comment or be unexported (golint)
    • Line 39: warning: exported method FakeBlobClient.PutBlock should have comment or be unexported (golint)
    • Line 45: warning: exported method FakeBlobClient.PutBlockList should have comment or be unexported (golint)
    • Line 51: warning: exported method FakeBlobClient.Get should have comment or be unexported (golint)
    • Line 60: warning: exported method FakeBlobClient.GetSASURI should have comment or be unexported (golint)
    • Line 65: warning: exported method FakeBlobClient.Delete should have comment or be unexported (golint)
    • Line 74: warning: exported method FakeBlobClient.Exists should have comment or be unexported (golint)
    • openshift-azure/pkg/util/azureclient/openshiftmanagedcluster/admin/client.go
    • Line 16: warning: exported type Client should have comment or be unexported (golint)
    • Line 21: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 80: warning: exported method Client.Backup should have comment or be unexported (golint)
    • Line 85: warning: exported method Client.CreateOrUpdate should have comment or be unexported (golint)
    • Line 90: warning: exported method Client.ForceUpdate should have comment or be unexported (golint)
    • Line 95: warning: exported method Client.Get should have comment or be unexported (golint)
    • Line 100: warning: exported method Client.GetControlPlanePods should have comment or be unexported (golint)
    • Line 105: warning: exported method Client.GetPluginVersion should have comment or be unexported (golint)
    • Line 110: warning: exported method Client.ListClusterVMs should have comment or be unexported (golint)
    • Line 115: warning: exported method Client.Reimage should have comment or be unexported (golint)
    • Line 120: warning: exported method Client.ListBackups should have comment or be unexported (golint)
    • Line 125: warning: exported method Client.Restore should have comment or be unexported (golint)
    • Line 130: warning: exported method Client.RotateSecrets should have comment or be unexported (golint)
    • Line 135: warning: exported method Client.RotateCertificates should have comment or be unexported (golint)
    • Line 140: warning: exported method Client.RotateCertificatesAndSecrets should have comment or be unexported (golint)
    • Line 145: warning: exported method Client.RunCommand should have comment or be unexported (golint)
    • openshift-azure/pkg/api/marshal.go
    • Line 11: warning: exported method Config.MarshalJSON should have comment or be unexported (golint)
    • Line 15: warning: exported method Config.UnmarshalJSON should have comment or be unexported (golint)
    • Line 19: warning: exported method CertKeyPair.MarshalJSON should have comment or be unexported (golint)
    • Line 23: warning: exported method CertKeyPair.UnmarshalJSON should have comment or be unexported (golint)
    • Line 27: warning: exported method IdentityProvider.UnmarshalJSON should have comment or be unexported (golint)
    • openshift-azure/pkg/api/admin/marshal.go
    • Line 11: warning: exported method Config.MarshalJSON should have comment or be unexported (golint)
    • Line 15: warning: exported method Config.UnmarshalJSON should have comment or be unexported (golint)
    • Line 19: warning: exported method Certificate.MarshalJSON should have comment or be unexported (golint)
    • Line 23: warning: exported method Certificate.UnmarshalJSON should have comment or be unexported (golint)
    • Line 27: warning: exported method CertificateChain.MarshalJSON should have comment or be unexported (golint)
    • Line 31: warning: exported method CertificateChain.UnmarshalJSON should have comment or be unexported (golint)
    • Line 35: warning: exported method IdentityProvider.UnmarshalJSON should have comment or be unexported (golint)
    • openshift-azure/pkg/util/azureclient/fake/resources/deployments.go
    • Line 30: warning: exported method FakeDeploymentsClient.CreateOrUpdate should have comment or be unexported (golint)
    • Line 41: warning: exported method FakeDeploymentsClient.Client should have comment or be unexported (golint)
    • Line 45: warning: comment on exported method FakeDeploymentsClient.CreateOrUpdateAndWait should be of the form "CreateOrUpdateAndWait ..." (golint)
    • openshift-azure/pkg/cluster/updateblob/types.go
    • Line 3: warning: exported type HostnameHashes should have comment or be unexported (golint)
    • Line 10: warning: exported type ScalesetHashes should have comment or be unexported (golint)
    • Line 17: warning: exported type UpdateBlob should have comment or be unexported (golint)
    • Line 24: warning: exported function NewUpdateBlob should have comment or be unexported (golint)
    • openshift-azure/pkg/cluster/types.go
    • Line 68: warning: exported type Upgrade should have comment or be unexported (golint)
    • Line 147: warning: exported method Upgrade.EnrichCertificatesFromVault should have comment or be unexported (golint)
    • Line 151: warning: exported method Upgrade.EnrichStorageAccountKeys should have comment or be unexported (golint)
    • Line 155: warning: exported method Upgrade.GenerateARM should have comment or be unexported (golint)
    • openshift-azure/pkg/arm/v16/derive.go
    • Line 18: warning: exported type DockerConfigJson should have comment or be unexported (golint)
    • Line 22: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type DockerConfigEntry should have comment or be unexported (golint)
    • openshift-azure/pkg/api/validate/serviceprincipal.go
    • Line 24: warning: exported type RoleLister should have comment or be unexported (golint)
    • Line 28: warning: exported type SimpleRoleLister should have comment or be unexported (golint)
    • Line 30: warning: exported method SimpleRoleLister.ListAADApplicationRoles should have comment or be unexported (golint)
    • Line 61: warning: exported type DummyRoleLister should have comment or be unexported (golint)
    • Line 65: warning: exported method DummyRoleLister.ListAADApplicationRoles should have comment or be unexported (golint)
    • openshift-azure/pkg/cluster/updateblob/marshal.go
    • Line 11: warning: exported method HostnameHashes.MarshalJSON should have comment or be unexported (golint)
    • Line 29: warning: exported method HostnameHashes.UnmarshalJSON should have comment or be unexported (golint)
    • Line 46: warning: exported method ScalesetHashes.MarshalJSON should have comment or be unexported (golint)
    • Line 64: warning: exported method ScalesetHashes.UnmarshalJSON should have comment or be unexported (golint)
    • openshift-azure/pkg/util/azureclient/azureclient.go
    • Line 25: warning: exported const KeyVaultEndpoint should have comment or be unexported (golint)
    • Line 62: warning: exported function SetupClient should have comment or be unexported (golint)
    • Line 76: warning: exported function NewAuthorizer should have comment or be unexported (golint)
    • Line 88: warning: exported function GetAuthorizerFromContext should have comment or be unexported (golint)
    • Line 96: warning: exported function NewAuthorizerFromEnvironment should have comment or be unexported (golint)
    • openshift-azure/pkg/fakerp/server.go
    • Line 26: warning: exported type Server should have comment or be unexported (golint)
    • Line 42: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 76: warning: exported method Server.Run should have comment or be unexported (golint)
    • openshift-azure/pkg/api/plugin/marshal.go
    • Line 9: warning: exported method Config.MarshalJSON should have comment or be unexported (golint)
    • Line 13: warning: exported method Config.UnmarshalJSON should have comment or be unexported (golint)
    • Line 17: warning: exported method CertKeyPair.MarshalJSON should have comment or be unexported (golint)
    • Line 21: warning: exported method CertKeyPair.UnmarshalJSON should have comment or be unexported (golint)
    • openshift-azure/pkg/arm/v22/derive.go
    • Line 18: warning: exported type DockerConfigJson should have comment or be unexported (golint)
    • Line 22: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type DockerConfigEntry should have comment or be unexported (golint)
    • openshift-azure/pkg/fakerp/aad.go
    • Line 27: warning: comment on exported const OSAMasterRoleDefinitionID should be of the form "OSAMasterRoleDefinitionID ..." (golint)
    • Line 29: warning: exported const OSAWorkerRoleDefinitionID should have comment (or a comment on this block) or be unexported (golint)
    • openshift-azure/pkg/arm/v20/derive.go
    • Line 18: warning: exported type DockerConfigJson should have comment or be unexported (golint)
    • Line 22: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type DockerConfigEntry should have comment or be unexported (golint)
    • openshift-azure/pkg/cluster/admin_actions.go
    • Line 11: warning: exported method Upgrade.Restart should have comment or be unexported (golint)
    • Line 15: warning: exported method Upgrade.Reimage should have comment or be unexported (golint)
    • Line 19: warning: exported method Upgrade.ListVMHostnames should have comment or be unexported (golint)
    • Line 40: warning: exported method Upgrade.RunCommand should have comment or be unexported (golint)
    • openshift-azure/test/reporters/capture.go
    • Line 13: warning: exported type Capture should have comment or be unexported (golint)
    • Line 20: warning: exported method Capture.Close should have comment or be unexported (golint)
    • Line 43: warning: exported function NewCapture should have comment or be unexported (golint)
    • Line 86: warning: exported function StartCapture should have comment or be unexported (golint)
    • openshift-azure/pkg/util/azureclient/fake/network/virtualnetworks.go
    • Line 11: warning: exported type NetworkRP should have comment or be unexported (golint)
    • Line 25: warning: exported method FakeVirtualNetworksClient.Get should have comment or be unexported (golint)
    • Line 35: warning: exported method FakeVirtualNetworksClient.List should have comment or be unexported (golint)
    • Line 39: warning: exported method FakeVirtualNetworksClient.CreateOrUpdate should have comment or be unexported (golint)
    • Line 43: warning: exported method FakeVirtualNetworksClient.Delete should have comment or be unexported (golint)
    • Line 54: warning: exported method FakeVirtualNetworksClient.Client should have comment or be unexported (golint)
    • Line 54: warning: receiver name d should be consistent with previous receiver name vn for FakeVirtualNetworksClient (golint)
    • openshift-azure/pkg/util/writers/writers.go
    • Line 19: warning: exported type Writer should have comment or be unexported (golint)
    • Line 27: warning: exported function NewFilesystemWriter should have comment or be unexported (golint)
    • Line 61: warning: exported function NewTarWriter should have comment or be unexported (golint)
    • openshift-azure/pkg/api/plugin.go
    • Line 11: warning: exported const ContextKeyClientAuthorizer should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type PluginStep should have comment or be unexported (golint)
    • Line 19: warning: exported const PluginStepDeploy should have comment (or a comment on this block) or be unexported (golint)
    • Line 64: warning: exported type Command should have comment or be unexported (golint)
    • Line 67: warning: exported const CommandRestartNetworkManager should have comment (or a comment on this block) or be unexported (golint)
    • openshift-azure/pkg/arm/v15/derive.go
    • Line 18: warning: exported type DockerConfigJson should have comment or be unexported (golint)
    • Line 22: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type DockerConfigEntry should have comment or be unexported (golint)
    • openshift-azure/pkg/arm/v21/derive.go
    • Line 18: warning: exported type DockerConfigJson should have comment or be unexported (golint)
    • Line 22: warning: exported type DockerConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type DockerConfigEntry should have comment or be unexported (golint)
    • openshift-azure/pkg/util/enrich/enrich.go
    • Line 20: warning: exported function StorageAccountKeys should have comment or be unexported (golint)
    • Line 40: warning: exported function SASURIs should have comment or be unexported (golint)
    • Line 75: warning: exported function CertificatesFromVault should have comment or be unexported (golint)
    • Line 91: warning: exported function MonitorIDAndKey should have comment or be unexported (golint)
    • Line 105: warning: exported function PrivateAPIServerIPAddress should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words