Preparing report...

Report for github.com/bloomberg/solr-operator

A    Great!    Found 21 issues across 32 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!


gocyclo68%

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.


golint46%

Golint is a linter for Go source code.

    • solr-operator/api/v1beta1/solrcloud_types.go
    • Line 34: warning: exported const DefaultPullPolicy should have comment (or a comment on this block) or be unexported (golint)
    • Line 172: warning: exported type CustomSolrKubeOptions should have comment or be unexported (golint)
    • Line 203: warning: exported type SolrDataStorageOptions should have comment or be unexported (golint)
    • Line 233: warning: exported type SolrPersistentDataStorageOptions should have comment or be unexported (golint)
    • Line 265: warning: comment on exported const VolumeReclaimPolicyRetain should be of the form "VolumeReclaimPolicyRetain ..." (golint)
    • Line 268: warning: comment on exported const VolumeReclaimPolicyDelete should be of the form "VolumeReclaimPolicyDelete ..." (golint)
    • Line 317: warning: exported type SolrEphemeralDataStorageOptions should have comment or be unexported (golint)
    • Line 328: warning: exported type SolrBackupRestoreOptions should have comment or be unexported (golint)
    • Line 342: warning: exported type SolrAddressabilityOptions should have comment or be unexported (golint)
    • Line 433: warning: comment on exported type ExternalAddressabilityMethod should be of the form "ExternalAddressabilityMethod ..." (with optional leading article) (golint)
    • Line 439: warning: comment on exported const Ingress should be of the form "Ingress ..." (golint)
    • Line 442: warning: comment on exported const ExternalDNS should be of the form "ExternalDNS ..." (golint)
    • Line 445: warning: comment on exported const LoadBalancer should be of the form "LoadBalancer ..." (golint)
    • Line 470: warning: exported type SolrUpdateStrategy should have comment or be unexported (golint)
    • Line 486: warning: comment on exported const ManagedUpdate should be of the form "ManagedUpdate ..." (golint)
    • Line 490: warning: comment on exported const StatefulSetUpdate should be of the form "StatefulSetUpdate ..." (golint)
    • Line 493: warning: comment on exported const ManualUpdate should be of the form "ManualUpdate ..." (golint)
    • Line 507: warning: comment on exported type ManagedUpdateOptions should be of the form "ManagedUpdateOptions ..." (with optional leading article) (golint)
    • Line 565: warning: exported method ZookeeperRef.GetACLs should have comment or be unexported (golint)
    • Line 777: warning: exported method SolrCloud.GetAllSolrNodeNames should have comment or be unexported (golint)
    • Line 790: warning: exported method SolrCloud.BasicAuthSecretName should have comment or be unexported (golint)
    • Line 793: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 798: warning: exported method SolrCloud.SecurityBootstrapSecretName should have comment or be unexported (golint)
    • Line 846: warning: exported method SolrCloudStatus.ZkConnectionString should have comment or be unexported (golint)
    • Line 849: warning: exported method SolrCloudStatus.DissectZkInfo should have comment or be unexported (golint)
    • Line 858: warning: exported method ZookeeperConnectionInfo.ZkConnectionString should have comment or be unexported (golint)
    • Line 874: warning: exported method ExternalAddressability.UsesIndividualNodeServices should have comment or be unexported (golint)
    • Line 874: warning: receiver name extOpts should be consistent with previous receiver name opts for ExternalAddressability (golint)
    • Line 879: warning: exported method SolrCloud.CommonExternalPrefix should have comment or be unexported (golint)
    • Line 883: warning: exported method SolrCloud.CommonExternalUrl should have comment or be unexported (golint)
    • Line 887: warning: exported method SolrCloud.NodeIngressPrefix should have comment or be unexported (golint)
    • Line 891: warning: exported method SolrCloud.ExternalDnsDomain should have comment or be unexported (golint)
    • Line 898: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 903: warning: exported method SolrCloud.NodeHeadlessUrl should have comment or be unexported (golint)
    • Line 911: warning: exported method SolrCloud.NodeServiceUrl should have comment or be unexported (golint)
    • Line 919: warning: exported method SolrCloud.CommonPortSuffix should have comment or be unexported (golint)
    • Line 923: warning: exported method SolrCloud.NodePortSuffix should have comment or be unexported (golint)
    • Line 927: warning: exported method SolrCloud.NodePort should have comment or be unexported (golint)
    • Line 937: warning: exported method SolrCloud.PortToSuffix should have comment or be unexported (golint)
    • Line 951: warning: exported method SolrCloud.InternalNodeUrl should have comment or be unexported (golint)
    • Line 961: warning: exported method SolrCloud.InternalCommonUrl should have comment or be unexported (golint)
    • Line 969: warning: exported method SolrCloud.ExternalNodeUrl should have comment or be unexported (golint)
    • Line 982: warning: exported method SolrCloud.ExternalCommonUrl should have comment or be unexported (golint)
    • Line 994: warning: exported method SolrCloud.UrlScheme should have comment or be unexported (golint)
    • Line 1002: warning: exported method SolrCloud.AdvertisedNodeHost should have comment or be unexported (golint)
    • Line 1006: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1011: warning: exported method SolrCloud.UsesPersistentStorage should have comment or be unexported (golint)
    • Line 1015: warning: exported method SolrCloud.SharedLabels should have comment or be unexported (golint)
    • Line 1019: warning: exported method SolrCloud.SharedLabelsWith should have comment or be unexported (golint)
    • Line 1045: warning: comment on exported type ClientAuthType should be of the form "ClientAuthType ..." (with optional leading article) (golint)
    • Line 1049: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • Line 1054: warning: exported type SolrTLSOptions should have comment or be unexported (golint)
    • Line 1088: warning: comment on exported type AuthenticationType should be of the form "AuthenticationType ..." (with optional leading article) (golint)
    • Line 1092: warning: exported const Basic should have comment (or a comment on this block) or be unexported (golint)
    • Line 1095: warning: exported type SolrSecurityOptions should have comment or be unexported (golint)
    • solr-operator/controllers/solrbackup_controller.go
    • Line 59: warning: exported method SolrBackupReconciler.Reconcile should have comment or be unexported (golint)
    • Line 300: warning: exported method SolrBackupReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 304: warning: exported method SolrBackupReconciler.SetupWithManagerAndReconciler should have comment or be unexported (golint)
    • solr-operator/controllers/solrcloud_controller.go
    • Line 61: warning: exported function UseZkCRD should have comment or be unexported (golint)
    • Line 83: warning: exported method SolrCloudReconciler.Reconcile should have comment or be unexported (golint)
    • Line 374: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 683: warning: error should be the last type when returning multiple items (golint)
    • Line 882: warning: exported method SolrCloudReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 886: warning: exported method SolrCloudReconciler.SetupWithManagerAndReconciler should have comment or be unexported (golint)
    • Line 1008: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • solr-operator/controllers/solrprometheusexporter_controller.go
    • Line 61: warning: exported method SolrPrometheusExporterReconciler.Reconcile should have comment or be unexported (golint)
    • Line 187: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 295: warning: exported method SolrPrometheusExporterReconciler.SetupWithManager should have comment or be unexported (golint)
    • Line 299: warning: exported method SolrPrometheusExporterReconciler.SetupWithManagerAndReconciler should have comment or be unexported (golint)
    • solr-operator/api/v1beta1/common_types.go
    • Line 215: warning: exported method ContainerImage.ToImageName should have comment or be unexported (golint)
    • Line 219: warning: exported function ImageVersion should have comment or be unexported (golint)
    • Line 223: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 228: warning: comment on exported type ZookeeperConnectionInfo should be of the form "ZookeeperConnectionInfo ..." (with optional leading article) (golint)
    • Line 272: warning: comment on exported type ZookeeperACL should be of the form "ZookeeperACL ..." (with optional leading article) (golint)
    • solr-operator/controllers/util/solr_api/errors.go
    • Line 18: warning: don't use an underscore in package name (golint)
    • Line 22: warning: exported function CheckForCollectionsApiError should have comment or be unexported (golint)
    • Line 33: warning: exported function CollectionsAPIError should have comment or be unexported (golint)
    • Line 40: warning: exported type APIError should have comment or be unexported (golint)
    • solr-operator/api/v1beta1/solrbackup_types.go
    • Line 31: warning: exported const DefaultAWSCliImageRepo should have comment (or a comment on this block) or be unexported (golint)
    • Line 152: warning: comment on exported type VolumePersistenceSource should be of the form "VolumePersistenceSource ..." (with optional leading article) (golint)
    • Line 262: warning: exported method SolrBackup.SharedLabels should have comment or be unexported (golint)
    • Line 266: warning: exported method SolrBackup.SharedLabelsWith should have comment or be unexported (golint)
    • Line 279: warning: comment on exported method SolrBackup.PersistenceJobName should be of the form "PersistenceJobName ..." (golint)
    • solr-operator/api/v1beta1/solrprometheusexporter_types.go
    • Line 26: warning: exported const SolrPrometheusExporterTechnologyLabel should have comment (or a comment on this block) or be unexported (golint)
    • Line 139: warning: comment on exported type StandaloneSolrReference should be of the form "StandaloneSolrReference ..." (with optional leading article) (golint)
    • Line 145: warning: exported type CustomExporterKubeOptions should have comment or be unexported (golint)
    • Line 200: warning: exported method SolrPrometheusExporter.SharedLabels should have comment or be unexported (golint)
    • Line 204: warning: exported method SolrPrometheusExporter.SharedLabelsWith should have comment or be unexported (golint)
    • Line 218: warning: receiver name sc should be consistent with previous receiver name spe for SolrPrometheusExporter (golint)
    • Line 223: warning: receiver name sc should be consistent with previous receiver name spe for SolrPrometheusExporter (golint)
    • Line 228: warning: receiver name sc should be consistent with previous receiver name spe for SolrPrometheusExporter (golint)
    • Line 232: warning: exported method SolrPrometheusExporter.MetricsIngressPrefix should have comment or be unexported (golint)
    • Line 232: warning: receiver name sc should be consistent with previous receiver name spe for SolrPrometheusExporter (golint)
    • Line 236: warning: exported method SolrPrometheusExporter.MetricsIngressUrl should have comment or be unexported (golint)
    • Line 236: warning: receiver name sc should be consistent with previous receiver name spe for SolrPrometheusExporter (golint)
    • solr-operator/controllers/util/solr_api/cluster_status.go
    • Line 18: warning: don't use an underscore in package name (golint)
    • Line 20: warning: exported type SolrOverseerStatusResponse should have comment or be unexported (golint)
    • Line 36: warning: exported type SolrClusterStatusResponse should have comment or be unexported (golint)
    • Line 43: warning: exported type SolrClusterStatus should have comment or be unexported (golint)
    • Line 57: warning: exported type SolrCollectionStatus should have comment or be unexported (golint)
    • Line 89: warning: exported type SolrCollectionRouter should have comment or be unexported (golint)
    • Line 93: warning: exported type SolrShardStatus should have comment or be unexported (golint)
    • Line 104: warning: exported type SolrShardState should have comment or be unexported (golint)
    • Line 107: warning: exported const ShardActive should have comment (or a comment on this block) or be unexported (golint)
    • Line 111: warning: exported type SolrReplicaStatus should have comment or be unexported (golint)
    • Line 126: warning: exported type SolrReplicaState should have comment or be unexported (golint)
    • Line 129: warning: exported const ReplicaActive should have comment (or a comment on this block) or be unexported (golint)
    • Line 135: warning: exported type SolrReplicaType should have comment or be unexported (golint)
    • Line 138: warning: exported const NRT should have comment (or a comment on this block) or be unexported (golint)
    • Line 147: warning: exported const ImplicitRouter should have comment (or a comment on this block) or be unexported (golint)
    • solr-operator/controllers/util/solr_util.go
    • Line 40: warning: exported const SolrClientPortName should have comment (or a comment on this block) or be unexported (golint)
    • Line 1027: warning: exported function TLSEnvVars should have comment or be unexported (golint)
    • Line 1273: warning: exported function BasicAuthHeader should have comment or be unexported (golint)
    • Line 1278: warning: exported function ValidateBasicAuthSecret should have comment or be unexported (golint)
    • Line 1297: warning: exported function GenerateBasicAuthSecretWithBootstrap should have comment or be unexported (golint)
    • Line 1406: warning: exported function GetCustomProbePaths should have comment or be unexported (golint)
    • solr-operator/main.go
    • Line 46: warning: exported const EnvOperatorPodName should have comment (or a comment on this block) or be unexported (golint)
    • solr-operator/controllers/util/backup_util.go
    • Line 36: warning: exported const BaseBackupRestorePath should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported function BackupRestoreSubPathForCloud should have comment or be unexported (golint)
    • Line 53: warning: exported function BackupSubPathForCloud should have comment or be unexported (golint)
    • Line 57: warning: exported function RestoreSubPathForCloud should have comment or be unexported (golint)
    • Line 61: warning: exported function BackupPath should have comment or be unexported (golint)
    • Line 65: warning: exported function RestorePath should have comment or be unexported (golint)
    • Line 69: warning: exported function AsyncIdForCollectionBackup should have comment or be unexported (golint)
    • Line 73: warning: exported function CheckStatusOfCollectionBackups should have comment or be unexported (golint)
    • Line 95: warning: exported function GenerateBackupPersistenceJobForCloud should have comment or be unexported (golint)
    • Line 320: warning: exported function StartBackupForCollection should have comment or be unexported (golint)
    • Line 344: warning: exported function CheckBackupForCollection should have comment or be unexported (golint)
    • Line 373: warning: exported function DeleteAsyncInfoForBackup should have comment or be unexported (golint)
    • Line 389: warning: exported function EnsureDirectoryForBackup should have comment or be unexported (golint)
    • Line 400: warning: exported function RunExecForPod should have comment or be unexported (golint)
    • solr-operator/controllers/util/common.go
    • Line 63: warning: exported function DuplicateLabelsOrAnnotations should have comment or be unexported (golint)
    • Line 71: warning: exported function MergeLabelsOrAnnotations should have comment or be unexported (golint)
    • Line 360: warning: exported function CopyPodTemplates should have comment or be unexported (golint)
    • Line 437: warning: exported function CopyPodContainers should have comment or be unexported (golint)
    • solr-operator/controllers/util/solr_update_util.go
    • Line 32: warning: exported const DefaultMaxPodsUnavailable should have comment (or a comment on this block) or be unexported (golint)
    • Line 373: warning: exported type SolrNodeContents should have comment or be unexported (golint)
    • Line 404: warning: exported method SolrNodeContents.InClusterState should have comment or be unexported (golint)
    • solr-operator/controllers/util/solr_api/api.go
    • Line 18: warning: don't use an underscore in package name (golint)
    • Line 37: warning: exported function SetNoVerifyTLSHttpClient should have comment or be unexported (golint)
    • Line 41: warning: exported function SetMTLSHttpClient should have comment or be unexported (golint)
    • Line 45: warning: exported type SolrAsyncResponse should have comment or be unexported (golint)
    • Line 55: warning: exported type SolrResponseHeader should have comment or be unexported (golint)
    • Line 61: warning: exported type SolrAsyncStatus should have comment or be unexported (golint)
    • Line 68: warning: exported function CallCollectionsApi should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign78%

IneffAssign detects ineffectual assignments in Go code.


misspell87%

Misspell Finds commonly misspelled English words