Preparing report...

Report for github.com/AliyunContainerService/open-service-broker-alibabacloud

A+    Excellent!    Found 25 issues across 40 files

Tweet

gofmt95%

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!


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.


golint42%

Golint is a linter for Go source code.

    • open-service-broker-alibabacloud/pkg/services/oss/oss.go
    • Line 10: warning: exported type ConnectionInfo should have comment or be unexported (golint)
    • Line 15: warning: exported type UserMetaData should have comment or be unexported (golint)
    • Line 25: warning: exported function GetCloudServiceMetaData should have comment or be unexported (golint)
    • Line 67: warning: exported function GetBucketNameForInstance should have comment or be unexported (golint)
    • Line 71: warning: exported function CreateOssBucket should have comment or be unexported (golint)
    • Line 97: warning: exported function DeleteOssBucket should have comment or be unexported (golint)
    • Line 113: warning: exported function CheckOssInstanceStatus should have comment or be unexported (golint)
    • Line 139: warning: exported function GetOSSEndPoint should have comment or be unexported (golint)
    • Line 160: warning: exported function GetOssRamPolicy should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/oss/ram.go
    • Line 8: warning: exported function CreateRamNewClient should have comment or be unexported (golint)
    • Line 95: warning: exported function CreateRamUserForBinding should have comment or be unexported (golint)
    • Line 176: warning: exported function DeleteRamUserForBinding should have comment or be unexported (golint)
    • Line 215: warning: exported function GetRamUserForBinding should have comment or be unexported (golint)
    • Line 284: warning: exported function CreateRamForInstance should have comment or be unexported (golint)
    • Line 364: warning: exported function DeleteRamForInstance should have comment or be unexported (golint)
    • Line 408: warning: exported function CheckRamForInstance should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/controller/async_engine.go
    • Line 12: warning: exported const AsyncLoopTime should have comment or be unexported (golint)
    • Line 14: warning: exported type Async should have comment or be unexported (golint)
    • Line 27: warning: exported type AsyncEngine should have comment or be unexported (golint)
    • Line 33: warning: exported function NewAsyncEngine should have comment or be unexported (golint)
    • Line 66: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 77: warning: exported method AsyncEngine.Run should have comment or be unexported (golint)
    • Line 81: warning: exported method AsyncEngine.AddAsyncInstance should have comment or be unexported (golint)
    • Line 95: warning: exported method AsyncEngine.DeleteAsyncInstance should have comment or be unexported (golint)
    • Line 109: warning: exported method AsyncEngine.UpdateAsyncInstance should have comment or be unexported (golint)
    • Line 126: warning: exported method AsyncEngine.GetAsyncInstance should have comment or be unexported (golint)
    • Line 133: warning: exported method AsyncEngine.GetAsyncBinding should have comment or be unexported (golint)
    • Line 177: warning: exported function GetBrokerByName should have comment or be unexported (golint)
    • Line 182: warning: exported method AsyncEngine.GetProvisionInstanceLastOperation should have comment or be unexported (golint)
    • Line 210: warning: exported method AsyncEngine.GetDeprovisionInstanceLastOperation should have comment or be unexported (golint)
    • Line 238: warning: exported method AsyncEngine.GetBindingLastOperation should have comment or be unexported (golint)
    • Line 264: warning: exported method AsyncEngine.GetUnBindingLastOperation should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/server/job.go
    • Line 11: warning: exported var JobQueueMax should have comment or be unexported (golint)
    • Line 16: warning: exported type JobPayload should have comment or be unexported (golint)
    • Line 20: warning: exported type Job should have comment or be unexported (golint)
    • Line 27: warning: exported function NewJobQueue should have comment or be unexported (golint)
    • Line 38: warning: exported function EnqueueJob should have comment or be unexported (golint)
    • Line 43: warning: exported function GetJobQueue should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/ots/broker.go
    • Line 18: warning: exported type OTSBroker should have comment or be unexported (golint)
    • Line 27: warning: exported function CreateBroker should have comment or be unexported (golint)
    • Line 32: warning: exported method OTSBroker.Catalog should have comment or be unexported (golint)
    • Line 36: warning: exported method OTSBroker.Provision should have comment or be unexported (golint)
    • Line 72: warning: exported method OTSBroker.GetInstanceStatus should have comment or be unexported (golint)
    • Line 91: warning: exported method OTSBroker.GetServiceInstance should have comment or be unexported (golint)
    • Line 95: warning: exported method OTSBroker.Deprovision should have comment or be unexported (golint)
    • Line 112: warning: exported method OTSBroker.Bind should have comment or be unexported (golint)
    • Line 133: warning: exported method OTSBroker.UnBind should have comment or be unexported (golint)
    • Line 156: warning: exported method OTSBroker.GetBindingStatus should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/rds/rds.go
    • Line 10: warning: exported type ConnectionInfo should have comment or be unexported (golint)
    • Line 56: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 74: warning: exported method RDSBroker.CheckDBInstanceStatus should have comment or be unexported (golint)
    • Line 96: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 125: warning: exported method RDSBroker.CheckAccountStatus should have comment or be unexported (golint)
    • Line 161: warning: exported type UserMetaData should have comment or be unexported (golint)
    • Line 171: warning: exported function GetCloudServiceMetaData should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/controller/binding.go
    • Line 8: warning: exported type BindingPayload should have comment or be unexported (golint)
    • Line 15: warning: exported method BindingPayload.Deal should have comment or be unexported (golint)
    • Line 33: warning: exported type UnBindingPayload should have comment or be unexported (golint)
    • Line 41: warning: exported method UnBindingPayload.Deal should have comment or be unexported (golint)
    • Line 57: warning: exported type BindingLastOperationPayload should have comment or be unexported (golint)
    • Line 64: warning: exported method BindingLastOperationPayload.Deal should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/controller/instance.go
    • Line 8: warning: exported type CreateServiceInstancePayload should have comment or be unexported (golint)
    • Line 14: warning: exported method CreateServiceInstancePayload.Deal should have comment or be unexported (golint)
    • Line 32: warning: exported type DeleteServiceInstancePayload should have comment or be unexported (golint)
    • Line 38: warning: exported method DeleteServiceInstancePayload.Deal should have comment or be unexported (golint)
    • Line 54: warning: exported type InstanceLastOperationPayload should have comment or be unexported (golint)
    • Line 60: warning: exported method InstanceLastOperationPayload.Deal should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/ots/ots.go
    • Line 11: warning: exported type ConnectionInfo should have comment or be unexported (golint)
    • Line 16: warning: exported type UserMetaData should have comment or be unexported (golint)
    • Line 26: warning: exported function GetCloudServiceMetaData should have comment or be unexported (golint)
    • Line 58: warning: error should be the last type when returning multiple items (golint)
    • Line 75: warning: exported function GetOtsNameForInstance should have comment or be unexported (golint)
    • Line 80: warning: exported function CreateOtsInstance should have comment or be unexported (golint)
    • Line 102: warning: exported function DeleteOtsInstance should have comment or be unexported (golint)
    • Line 123: warning: exported function CheckOtsInstanceStatus should have comment or be unexported (golint)
    • Line 147: warning: exported function GetOTSInstanceUrl should have comment or be unexported (golint)
    • Line 151: warning: exported function GetOTSEndPoint should have comment or be unexported (golint)
    • Line 171: warning: exported function GetOtsRamPolicy should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/ots/ram.go
    • Line 9: warning: exported function CreateRamNewClient should have comment or be unexported (golint)
    • Line 95: warning: exported function CreateRamUserForBinding should have comment or be unexported (golint)
    • Line 176: warning: exported function DeleteRamUserForBinding should have comment or be unexported (golint)
    • Line 215: warning: exported function GetRamUserForBinding should have comment or be unexported (golint)
    • Line 284: warning: exported function CreateRamForInstance should have comment or be unexported (golint)
    • Line 364: warning: exported function DeleteRamForInstance should have comment or be unexported (golint)
    • Line 408: warning: exported function CheckRamForInstance should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/rds/catalog.go
    • Line 9: warning: exported type ServiceInstanceMetadata should have comment or be unexported (golint)
    • Line 20: warning: exported type ServiceInstanceBasicMetadata should have comment or be unexported (golint)
    • Line 28: warning: exported const SelfDefineServicePlan should have comment (or a comment on this block) or be unexported (golint)
    • Line 314: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 335: warning: exported function GetAccountInfoFromBindingParameters should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/oss/catalog.go
    • Line 8: warning: exported type ServicePlanMetadata should have comment or be unexported (golint)
    • Line 22: warning: exported const SelfDefineServicePlan should have comment (or a comment on this block) or be unexported (golint)
    • Line 136: warning: exported function GetAccessInfoFromInstanceParameters should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/rds/broker.go
    • Line 34: warning: exported type RDSBroker should have comment or be unexported (golint)
    • Line 42: warning: exported function CreateBroker should have comment or be unexported (golint)
    • Line 51: warning: exported method RDSBroker.Catalog should have comment or be unexported (golint)
    • Line 55: warning: exported method RDSBroker.Provision should have comment or be unexported (golint)
    • Line 133: warning: exported method RDSBroker.GetInstanceStatus should have comment or be unexported (golint)
    • Line 138: warning: exported method RDSBroker.GetServiceInstance should have comment or be unexported (golint)
    • Line 142: warning: exported method RDSBroker.Deprovision should have comment or be unexported (golint)
    • Line 168: warning: exported method RDSBroker.Bind should have comment or be unexported (golint)
    • Line 206: warning: exported method RDSBroker.UnBind should have comment or be unexported (golint)
    • Line 225: warning: exported method RDSBroker.GetBindingStatus should have comment or be unexported (golint)
    • Line 252: warning: exported const SERVICE_CATALOG_TAG_KEY should have comment or be unexported (golint)
    • Line 253: warning: exported const SERVICE_CATALOG_TAG_VALUE should have comment or be unexported (golint)
    • Line 254: warning: exported const DEFAULT_PAGE_SIZE should have comment or be unexported (golint)
    • Line 260: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 266: warning: exported method RDSBroker.CreateDatabaseAccount should have comment or be unexported (golint)
    • Line 291: warning: exported method RDSBroker.ResetDatabaseAccount should have comment or be unexported (golint)
    • Line 325: warning: exported method RDSBroker.CreateNewClientFromStsToken should have comment or be unexported (golint)
    • Line 351: warning: exported method RDSBroker.CreateVpcClientFromStsToken should have comment or be unexported (golint)
    • Line 426: warning: exported method RDSBroker.GetEcsVpcIps should have comment or be unexported (golint)
    • Line 448: warning: exported method RDSBroker.SetRdsSecurityIps should have comment or be unexported (golint)
    • Line 468: warning: exported method RDSBroker.SetRdsIpsForEcs should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/services/oss/broker.go
    • Line 18: warning: exported type OSSBroker should have comment or be unexported (golint)
    • Line 27: warning: exported function CreateBroker should have comment or be unexported (golint)
    • Line 36: warning: exported method OSSBroker.Catalog should have comment or be unexported (golint)
    • Line 40: warning: exported method OSSBroker.Provision should have comment or be unexported (golint)
    • Line 92: warning: exported method OSSBroker.GetInstanceStatus should have comment or be unexported (golint)
    • Line 117: warning: exported method OSSBroker.GetServiceInstance should have comment or be unexported (golint)
    • Line 121: warning: exported method OSSBroker.Deprovision should have comment or be unexported (golint)
    • Line 145: warning: exported method OSSBroker.Bind should have comment or be unexported (golint)
    • Line 175: warning: exported method OSSBroker.UnBind should have comment or be unexported (golint)
    • Line 204: warning: exported method OSSBroker.GetBindingStatus should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/controller/base_controller.go
    • Line 12: warning: exported const StateProvisionInstanceInProgress should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported function NewBaseController should have comment or be unexported (golint)
    • Line 54: warning: exported function GetBaseController should have comment or be unexported (golint)
    • Line 58: warning: exported function RegisterBrokers should have comment or be unexported (golint)
    • Line 92: warning: exported function RegisterBroker should have comment or be unexported (golint)
    • Line 119: warning: exported method BaseController.GetCatalog should have comment or be unexported (golint)
    • Line 131: warning: exported method BaseController.GetServiceBroker should have comment or be unexported (golint)
    • Line 164: warning: exported type BindRunInfo should have comment or be unexported (golint)
    • Line 170: warning: exported type InstanceRunInfo should have comment or be unexported (golint)
    • Line 193: warning: exported method BaseController.CreateServiceInstance should have comment or be unexported (golint)
    • Line 249: warning: exported method BaseController.DeleteServiceInstance should have comment or be unexported (golint)
    • Line 292: warning: exported method BaseController.GetServiceInstanceStatus should have comment or be unexported (golint)
    • Line 309: warning: exported method BaseController.CreateServiceBinding should have comment or be unexported (golint)
    • Line 370: warning: exported method BaseController.DeleteServiceBinding should have comment or be unexported (golint)
    • Line 408: warning: exported method BaseController.GetServiceBindingStatus should have comment or be unexported (golint)
    • open-service-broker-alibabacloud/pkg/controller/storage.go
    • Line 14: warning: exported type Storage should have comment or be unexported (golint)
    • Line 23: warning: exported type StorageProvider should have comment or be unexported (golint)
    • Line 37: warning: exported function NewStorageProvider should have comment or be unexported (golint)
    • Line 48: warning: exported method StorageProvider.Init should have comment or be unexported (golint)
    • Line 59: warning: comment on exported method StorageProvider.WriteObject should be of the form "WriteObject ..." (golint)
    • Line 80: warning: exported method StorageProvider.GetObject should have comment or be unexported (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 101: warning: exported method StorageProvider.DeleteObject should have comment or be unexported (golint)
    • Line 124: warning: exported method StorageProvider.GetAllObject 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.


misspell92%

Misspell Finds commonly misspelled English words