Preparing report...

Report for github.com/yunionio/cloudpods

A    Great!    Found 2441 issues across 4595 files

Tweet

gofmt98%

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!


golint0%

Golint is a linter for Go source code.

An error occurred while running this test (exit status 3)


gocyclo92%

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.

    • cloudpods/pkg/compute/models/dbinstances.go
    • Line 290: warning: cyclomatic complexity 45 of function (*SDBInstanceManager).ValidateCreateData() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 20 of function (*SDBInstanceManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 793: warning: cyclomatic complexity 16 of function (*SDBInstance).PerformRecovery() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/regiondrivers/aliyun.go
    • Line 627: warning: cyclomatic complexity 45 of function (*SAliyunRegionDriver).ValidateUpdateLoadbalancerListenerData() is high (> 15) (gocyclo)
    • Line 434: warning: cyclomatic complexity 37 of function (*SAliyunRegionDriver).ValidateCreateLoadbalancerListenerData() is high (> 15) (gocyclo)
    • Line 881: warning: cyclomatic complexity 34 of function (*SAliyunRegionDriver).ValidateCreateDBInstanceData() is high (> 15) (gocyclo)
    • Line 219: warning: cyclomatic complexity 20 of function (*SAliyunRegionDriver).ValidateCreateLoadbalancerBackendData() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/regiondrivers/openstack.go
    • Line 1594: warning: cyclomatic complexity 31 of function (*SOpenStackRegionDriver).RequestSyncLoadbalancerBackendGroup() is high (> 15) (gocyclo)
    • Line 720: warning: cyclomatic complexity 26 of function (*SOpenStackRegionDriver).RequestDeleteLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 605: warning: cyclomatic complexity 25 of function (*SOpenStackRegionDriver).RequestSyncLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 387: warning: cyclomatic complexity 23 of function (*SOpenStackRegionDriver).RequestCreateLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 954: warning: cyclomatic complexity 20 of function (*SOpenStackRegionDriver).ValidateUpdateLoadbalancerListenerRuleData() is high (> 15) (gocyclo)
    • Line 1097: warning: cyclomatic complexity 19 of function (*SOpenStackRegionDriver).RequestDeleteLoadbalancerListenerRule() is high (> 15) (gocyclo)
    • Line 1544: warning: cyclomatic complexity 19 of function (*SOpenStackRegionDriver).validatorCachedLbbgConflict() is high (> 15) (gocyclo)
    • Line 1748: warning: cyclomatic complexity 19 of function (*SOpenStackRegionDriver).RequestDeleteLoadbalancerBackendGroup() is high (> 15) (gocyclo)
    • Line 877: warning: cyclomatic complexity 17 of function (*SOpenStackRegionDriver).ValidateCreateLoadbalancerListenerRuleData() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/loadbalancers.go
    • Line 470: warning: cyclomatic complexity 17 of function (*SLoadbalancer).GetCreateLoadbalancerParams() is high (> 15) (gocyclo)
    • Line 950: warning: cyclomatic complexity 16 of function (*SLoadbalancerManager).newFromCloudLoadbalancer() is high (> 15) (gocyclo)
    • Line 1086: warning: cyclomatic complexity 16 of function (*SLoadbalancer).SyncLoadbalancerEip() is high (> 15) (gocyclo)
    • cloudpods/pkg/cloudcommon/cmdline/parser.go
    • Line 220: warning: cyclomatic complexity 26 of function ParseBaremetalDiskConfig() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 22 of function ParseNetworkConfig() is high (> 15) (gocyclo)
    • Line 82: warning: cyclomatic complexity 16 of function ParseDiskConfig() is high (> 15) (gocyclo)
    • cloudpods/pkg/monitor/influxdbsubscribe/point.go
    • Line 738: warning: cyclomatic complexity 40 of function scanNumber() is high (> 15) (gocyclo)
    • Line 599: warning: cyclomatic complexity 30 of function scanFields() is high (> 15) (gocyclo)
    • Line 855: warning: cyclomatic complexity 24 of function scanBoolean() is high (> 15) (gocyclo)
    • Line 1881: warning: cyclomatic complexity 17 of function appendField() is high (> 15) (gocyclo)
    • cloudpods/pkg/keystone/models/identity_provider.go
    • Line 1253: warning: cyclomatic complexity 36 of function (*SIdentityProvider).TryUserJoinProject() is high (> 15) (gocyclo)
    • Line 361: warning: cyclomatic complexity 26 of function (*SIdentityProviderManager).ValidateCreateData() is high (> 15) (gocyclo)
    • Line 858: warning: cyclomatic complexity 25 of function (*SIdentityProvider).Purge() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/regiondrivers/qcloud.go
    • Line 1799: warning: cyclomatic complexity 20 of function (*SQcloudRegionDriver).RequestElasticcacheAccountResetPassword() is high (> 15) (gocyclo)
    • Line 746: warning: cyclomatic complexity 18 of function (*SQcloudRegionDriver).ValidateUpdateLoadbalancerListenerData() is high (> 15) (gocyclo)
    • Line 1474: warning: cyclomatic complexity 18 of function (*SQcloudRegionDriver).ValidateCreateElasticcacheData() is high (> 15) (gocyclo)
    • Line 550: warning: cyclomatic complexity 18 of function (*SQcloudRegionDriver).RequestCreateLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 476: warning: cyclomatic complexity 16 of function (*SQcloudRegionDriver).createLoadbalancerBackendGroup() is high (> 15) (gocyclo)
    • Line 1315: warning: cyclomatic complexity 16 of function (*SQcloudRegionDriver).RequestSyncLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 136: warning: cyclomatic complexity 16 of function (*SQcloudRegionDriver).ValidateCreateLoadbalancerListenerData() is high (> 15) (gocyclo)
    • Line 1018: warning: cyclomatic complexity 16 of function (*SQcloudRegionDriver).ValidateCreateLoadbalancerBackendData() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/cloudaccounts.go
    • Line 387: warning: cyclomatic complexity 37 of function (*SCloudaccountManager).validateCreateData() is high (> 15) (gocyclo)
    • Line 932: warning: cyclomatic complexity 22 of function (*SCloudaccount).importSubAccount() is high (> 15) (gocyclo)
    • Line 670: warning: cyclomatic complexity 21 of function (*SCloudaccount).PerformUpdateCredential() is high (> 15) (gocyclo)
    • Line 274: warning: cyclomatic complexity 20 of function (*SCloudaccount).ValidateUpdateData() is high (> 15) (gocyclo)
    • Line 1592: warning: cyclomatic complexity 18 of function (*SCloudaccountManager).ListItemFilter() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/loadbalanceragents.go
    • Line 408: warning: cyclomatic complexity 26 of function (*SLoadbalancerAgentManager).ValidateCreateData() is high (> 15) (gocyclo)
    • Line 870: warning: cyclomatic complexity 17 of function (*SLoadbalancerAgent).PerformParamsPatch() is high (> 15) (gocyclo)
    • Line 585: warning: cyclomatic complexity 17 of function (*SLoadbalancerAgentManager).CleanPendingDeleteLoadbalancers() is high (> 15) (gocyclo)
    • cloudpods/pkg/controller/autoscaling/controller.go
    • Line 178: warning: cyclomatic complexity 23 of function (*SASController).Scale() is high (> 15) (gocyclo)
    • Line 316: warning: cyclomatic complexity 16 of function (*SASController).DetachInstances() is high (> 15) (gocyclo)
    • Line 634: warning: cyclomatic complexity 16 of function (*SASController).actionAfterCreate() is high (> 15) (gocyclo)
    • cloudpods/pkg/vpcagent/ovn/keeper.go
    • Line 408: warning: cyclomatic complexity 23 of function (*OVNNorthboundKeeper).ClaimGuestnetwork() is high (> 15) (gocyclo)
    • Line 798: warning: cyclomatic complexity 17 of function (*OVNNorthboundKeeper).Sweep() is high (> 15) (gocyclo)
    • cloudpods/pkg/baremetal/tasks/baseprepare.go
    • Line 158: warning: cyclomatic complexity 35 of function (*sBaremetalPrepareTask).configIPMISetting() is high (> 15) (gocyclo)
    • Line 359: warning: cyclomatic complexity 20 of function (*sBaremetalPrepareTask).updateBmInfo() is high (> 15) (gocyclo)
    • Line 75: warning: cyclomatic complexity 17 of function (*sBaremetalPrepareTask).prepareBaremetalInfo() is high (> 15) (gocyclo)
    • Line 477: warning: cyclomatic complexity 16 of function (*sBaremetalPrepareTask).tryLocalIpmiAddr() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/regiondrivers/huawei.go
    • Line 888: warning: cyclomatic complexity 79 of function (*SHuaWeiRegionDriver).RequestSyncLoadbalancerBackendGroup() is high (> 15) (gocyclo)
    • Line 1615: warning: cyclomatic complexity 28 of function (*SHuaWeiRegionDriver).RequestDeleteLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 1337: warning: cyclomatic complexity 25 of function (*SHuaWeiRegionDriver).RequestSyncLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 1192: warning: cyclomatic complexity 21 of function (*SHuaWeiRegionDriver).RequestCreateLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 1739: warning: cyclomatic complexity 19 of function (*SHuaWeiRegionDriver).RequestDeleteLoadbalancerBackendGroup() is high (> 15) (gocyclo)
    • Line 818: warning: cyclomatic complexity 19 of function (*SHuaWeiRegionDriver).validatorCachedLbbgConflict() is high (> 15) (gocyclo)
    • cloudpods/pkg/multicloud/aws/instance.go
    • Line 579: warning: cyclomatic complexity 27 of function (*SRegion).GetInstances() is high (> 15) (gocyclo)
    • Line 769: warning: cyclomatic complexity 20 of function (*SRegion).CreateInstance() is high (> 15) (gocyclo)
    • Line 428: warning: cyclomatic complexity 18 of function (*SInstance).RebuildRoot() is high (> 15) (gocyclo)
    • Line 1017: warning: cyclomatic complexity 17 of function (*SRegion).ReplaceSystemDisk() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/regiondrivers/aws.go
    • Line 1214: warning: cyclomatic complexity 22 of function (*SAwsRegionDriver).RequestDeleteLoadbalancer() is high (> 15) (gocyclo)
    • Line 1005: warning: cyclomatic complexity 21 of function (*SAwsRegionDriver).RequestCreateLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 93: warning: cyclomatic complexity 18 of function validateAwsLbNetwork() is high (> 15) (gocyclo)
    • Line 676: warning: cyclomatic complexity 17 of function (*SAwsRegionDriver).ValidateCreateLoadbalancerBackendData() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/regiondrivers/managedvirtual.go
    • Line 1557: warning: cyclomatic complexity 31 of function (*SManagedVirtualizationRegionDriver).RequestCreateDBInstance() is high (> 15) (gocyclo)
    • Line 1705: warning: cyclomatic complexity 28 of function (*SManagedVirtualizationRegionDriver).RequestCreateDBInstanceFromBackup() is high (> 15) (gocyclo)
    • Line 948: warning: cyclomatic complexity 24 of function (*SManagedVirtualizationRegionDriver).RequestSyncLoadbalancerListener() is high (> 15) (gocyclo)
    • Line 786: warning: cyclomatic complexity 21 of function (*SManagedVirtualizationRegionDriver).RequestCreateLoadbalancerListener() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/guest_actions.go
    • Line 2485: warning: cyclomatic complexity 50 of function (*SGuest).PerformChangeConfig() is high (> 15) (gocyclo)
    • Line 1545: warning: cyclomatic complexity 41 of function (*SGuest).PerformRebuildRoot() is high (> 15) (gocyclo)
    • Line 2158: warning: cyclomatic complexity 24 of function (*SGuest).PerformChangeIpaddr() is high (> 15) (gocyclo)
    • Line 656: warning: cyclomatic complexity 22 of function (*SGuest).PerformDeploy() is high (> 15) (gocyclo)
    • Line 3018: warning: cyclomatic complexity 19 of function (*SGuest).PerformAssociateEip() is high (> 15) (gocyclo)
    • Line 237: warning: cyclomatic complexity 16 of function (*SGuest).PerformSaveGuestImage() is high (> 15) (gocyclo)
    • cloudpods/pkg/notify/models/notification.go
    • Line 195: warning: cyclomatic complexity 26 of function (*SNotificationManager).PerformEventNotify() is high (> 15) (gocyclo)
    • Line 562: warning: cyclomatic complexity 20 of function (*SNotificationManager).dataMigration() is high (> 15) (gocyclo)
    • Line 82: warning: cyclomatic complexity 20 of function (*SNotificationManager).ValidateCreateData() is high (> 15) (gocyclo)
    • cloudpods/pkg/cloudcommon/db/db_dispatcher.go
    • Line 517: warning: cyclomatic complexity 78 of function ListItems() is high (> 15) (gocyclo)
    • Line 340: warning: cyclomatic complexity 30 of function Query2List() is high (> 15) (gocyclo)
    • Line 1384: warning: cyclomatic complexity 22 of function (*DBModelDispatcher).BatchCreate() is high (> 15) (gocyclo)
    • Line 1193: warning: cyclomatic complexity 22 of function _doCreateItem() is high (> 15) (gocyclo)
    • Line 1612: warning: cyclomatic complexity 20 of function reflectDispatcherInternal() is high (> 15) (gocyclo)
    • Line 1023: warning: cyclomatic complexity 16 of function (*DBModelDispatcher).GetSpecific() is high (> 15) (gocyclo)
    • cloudpods/pkg/hostman/guestfs/fsdriver/linux.go
    • Line 944: warning: cyclomatic complexity 25 of function (*sRedhatLikeRootFs).deployNetworkingScripts() is high (> 15) (gocyclo)
    • Line 354: warning: cyclomatic complexity 20 of function (*sLinuxRootFs).PrepareFsForTemplate() is high (> 15) (gocyclo)
    • Line 580: warning: cyclomatic complexity 16 of function (*sDebianLikeRootFs).DeployNetworkingScripts() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/networks.go
    • Line 1915: warning: cyclomatic complexity 46 of function (*SNetworkManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 1392: warning: cyclomatic complexity 42 of function (*SNetworkManager).ValidateCreateData() is high (> 15) (gocyclo)
    • Line 1586: warning: cyclomatic complexity 28 of function (*SNetwork).validateUpdateData() is high (> 15) (gocyclo)
    • Line 1265: warning: cyclomatic complexity 22 of function (*SNetworkManager).newIfnameHint() is high (> 15) (gocyclo)
    • Line 2510: warning: cyclomatic complexity 20 of function (*SNetworkManager).PerformTryCreateNetwork() is high (> 15) (gocyclo)
    • Line 449: warning: cyclomatic complexity 16 of function (*SNetwork).getFreeIP() is high (> 15) (gocyclo)
    • Line 2359: warning: cyclomatic complexity 16 of function (*SNetwork).CheckInvalidToMerge() is high (> 15) (gocyclo)
    • cloudpods/pkg/multicloud/esxi/host.go
    • Line 1040: warning: cyclomatic complexity 41 of function (*SHost).CloneVM() is high (> 15) (gocyclo)
    • Line 779: warning: cyclomatic complexity 25 of function (*SHost).addDisks() is high (> 15) (gocyclo)
    • Line 912: warning: cyclomatic complexity 21 of function (*SHost).DoCreateVM() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 17 of function (*SHost).fetchNicInfo() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/vpcs.go
    • Line 1080: warning: cyclomatic complexity 22 of function (*SVpcManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 1519: warning: cyclomatic complexity 19 of function (*SVpc).PerformPrivate() is high (> 15) (gocyclo)
    • Line 700: warning: cyclomatic complexity 19 of function (*SVpcManager).InitializeData() is high (> 15) (gocyclo)
    • Line 804: warning: cyclomatic complexity 19 of function (*SVpcManager).ValidateCreateData() is high (> 15) (gocyclo)
    • cloudpods/pkg/lbagent/models/haproxy.go
    • Line 56: warning: cyclomatic complexity 29 of function (*LoadbalancerCorpus).GenHaproxyConfigs() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 28 of function (*LoadbalancerCorpus).genHaproxyConfigBackend() is high (> 15) (gocyclo)
    • Line 173: warning: cyclomatic complexity 23 of function (*LoadbalancerCorpus).genHaproxyConfigCommon() is high (> 15) (gocyclo)
    • Line 426: warning: cyclomatic complexity 20 of function (*LoadbalancerCorpus).genHaproxyConfigHttp() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/secgroups.go
    • Line 80: warning: cyclomatic complexity 32 of function (*SSecurityGroupManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 364: warning: cyclomatic complexity 28 of function (*SSecurityGroupManager).FetchCustomizeColumns() is high (> 15) (gocyclo)
    • cloudpods/pkg/cloudid/models/cloudprovider.go
    • Line 133: warning: cyclomatic complexity 20 of function (*SCloudprovider).SyncCustomCloudpoliciesForCloud() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 16 of function (*SCloudprovider).SyncSystemCloudpoliciesForCloud() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/guests.go
    • Line 1101: warning: cyclomatic complexity 99 of function (*SGuestManager).validateCreateData() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 80 of function (*SGuestManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 2966: warning: cyclomatic complexity 31 of function (*SGuest).SyncVMNics() is high (> 15) (gocyclo)
    • Line 3994: warning: cyclomatic complexity 29 of function (*SGuest).GetJsonDescAtHypervisor() is high (> 15) (gocyclo)
    • Line 4159: warning: cyclomatic complexity 22 of function (*SGuest).GetJsonDescAtBaremetal() is high (> 15) (gocyclo)
    • Line 1507: warning: cyclomatic complexity 22 of function (*SGuestManager).ValidatePolicyDefinitions() is high (> 15) (gocyclo)
    • Line 964: warning: cyclomatic complexity 21 of function (*SGuest).ValidateUpdateData() is high (> 15) (gocyclo)
    • Line 1936: warning: cyclomatic complexity 21 of function (*SGuest).moreExtraInfo() is high (> 15) (gocyclo)
    • Line 2473: warning: cyclomatic complexity 20 of function (*SGuest).syncWithCloudVM() is high (> 15) (gocyclo)
    • Line 2059: warning: cyclomatic complexity 19 of function (*SGuestManager).GetExportExtraKeys() is high (> 15) (gocyclo)
    • Line 4910: warning: cyclomatic complexity 18 of function (*SGuest).SyncVMEip() is high (> 15) (gocyclo)
    • Line 1597: warning: cyclomatic complexity 18 of function (*SGuestManager).validateEip() is high (> 15) (gocyclo)
    • Line 3303: warning: cyclomatic complexity 17 of function _guestResourceCountQuery() is high (> 15) (gocyclo)
    • Line 3877: warning: cyclomatic complexity 17 of function (*SGuest).GetDeployConfigOnHost() is high (> 15) (gocyclo)
    • Line 3174: warning: cyclomatic complexity 17 of function (*SGuest).SyncVMDisks() is high (> 15) (gocyclo)
    • Line 4399: warning: cyclomatic complexity 16 of function (*SGuest).GetShortDesc() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/hosts.go
    • Line 200: warning: cyclomatic complexity 58 of function (*SHostManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 4126: warning: cyclomatic complexity 46 of function (*SHost).addNetif() is high (> 15) (gocyclo)
    • Line 3253: warning: cyclomatic complexity 45 of function (*SHostManager).ValidateCreateData() is high (> 15) (gocyclo)
    • Line 5031: warning: cyclomatic complexity 28 of function (*SHost).SyncHostExternalNics() is high (> 15) (gocyclo)
    • Line 4313: warning: cyclomatic complexity 25 of function (*SHost).EnableNetif() is high (> 15) (gocyclo)
    • Line 1113: warning: cyclomatic complexity 21 of function (*SHost).GetSpec() is high (> 15) (gocyclo)
    • Line 2859: warning: cyclomatic complexity 21 of function (*SHost).getMoreDetails() is high (> 15) (gocyclo)
    • Line 1853: warning: cyclomatic complexity 20 of function (*SHost).syncSchedtags() is high (> 15) (gocyclo)
    • Line 2314: warning: cyclomatic complexity 20 of function (*SHost).SyncHostVMs() is high (> 15) (gocyclo)
    • Line 5844: warning: cyclomatic complexity 19 of function (*SHost).PerformSetReservedResourceForIsolatedDevice() is high (> 15) (gocyclo)
    • Line 4769: warning: cyclomatic complexity 16 of function (*SHost).PerformConvertHypervisor() is high (> 15) (gocyclo)
    • cloudpods/pkg/util/conditionparser/parser.go
    • Line 195: warning: cyclomatic complexity 52 of function evalCallInternal() is high (> 15) (gocyclo)
    • Line 546: warning: cyclomatic complexity 31 of function evalBinaryInternal() is high (> 15) (gocyclo)
    • Line 650: warning: cyclomatic complexity 19 of function evalIntegerOp() is high (> 15) (gocyclo)
    • cloudpods/pkg/multicloud/aws/bucket.go
    • Line 217: warning: cyclomatic complexity 19 of function (*SBucket).PutObject() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 17 of function s3ToCannedAcl() is high (> 15) (gocyclo)
    • Line 276: warning: cyclomatic complexity 16 of function (*SBucket).NewMultipartUpload() is high (> 15) (gocyclo)
    • Line 746: warning: cyclomatic complexity 16 of function (*SBucket).ListMultipartUploads() is high (> 15) (gocyclo)
    • cloudpods/pkg/cloudid/models/clouduser.go
    • Line 332: warning: cyclomatic complexity 46 of function (*SClouduserManager).ValidateCreateData() is high (> 15) (gocyclo)
    • Line 949: warning: cyclomatic complexity 26 of function (*SClouduser).PerformSetPolicies() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 18 of function (*SClouduserManager).FetchCustomizeColumns() is high (> 15) (gocyclo)
    • Line 1200: warning: cyclomatic complexity 17 of function (*SClouduser).PerformAttachPolicy() is high (> 15) (gocyclo)
    • Line 1284: warning: cyclomatic complexity 17 of function (*SClouduser).PerformDetachPolicy() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/elasticcache_instances.go
    • Line 995: warning: cyclomatic complexity 22 of function (*SElasticcache).GetCreateHuaweiElasticcacheParams() is high (> 15) (gocyclo)
    • Line 2049: warning: cyclomatic complexity 21 of function (*SElasticcache).cleanSecgroupIds() is high (> 15) (gocyclo)
    • Line 377: warning: cyclomatic complexity 20 of function (*SElasticcacheManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 20 of function (*SElasticcacheManager).FetchCustomizeColumns() is high (> 15) (gocyclo)
    • Line 912: warning: cyclomatic complexity 18 of function (*SElasticcache).GetCreateAliyunElasticcacheParams() is high (> 15) (gocyclo)
    • Line 630: warning: cyclomatic complexity 17 of function (*SElasticcacheManager).newFromCloudElasticcache() is high (> 15) (gocyclo)
    • Line 1096: warning: cyclomatic complexity 16 of function (*SElasticcache).GetCreateQCloudElasticcacheParams() is high (> 15) (gocyclo)
    • cloudpods/pkg/multicloud/qcloud/bucket.go
    • Line 938: warning: cyclomatic complexity 21 of function (*SBucket).SetPolicy() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 17 of function (*SBucket).PutObject() is high (> 15) (gocyclo)
    • Line 313: warning: cyclomatic complexity 16 of function (*SBucket).NewMultipartUpload() is high (> 15) (gocyclo)
    • cloudpods/pkg/cloudcommon/db/sharablebase.go
    • Line 399: warning: cyclomatic complexity 28 of function SharablePerformPublic() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 19 of function (*SSharableBaseResourceManager).FetchCustomizeColumns() is high (> 15) (gocyclo)
    • Line 148: warning: cyclomatic complexity 18 of function SharableManagerValidateCreateData() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/regiondrivers/kvm.go
    • Line 567: warning: cyclomatic complexity 21 of function (*SKVMRegionDriver).ValidateUpdateLoadbalancerListenerData() is high (> 15) (gocyclo)
    • Line 359: warning: cyclomatic complexity 20 of function (*SKVMRegionDriver).ValidateUpdateLoadbalancerListenerRuleData() is high (> 15) (gocyclo)
    • Line 166: warning: cyclomatic complexity 17 of function (*SKVMRegionDriver).ValidateCreateLoadbalancerBackendData() is high (> 15) (gocyclo)
    • Line 440: warning: cyclomatic complexity 17 of function (*SKVMRegionDriver).ValidateCreateLoadbalancerListenerData() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/elasticips.go
    • Line 113: warning: cyclomatic complexity 28 of function (*SElasticipManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 964: warning: cyclomatic complexity 26 of function (*SElasticip).PerformAssociate() is high (> 15) (gocyclo)
    • Line 1235: warning: cyclomatic complexity 24 of function (*SElasticipManager).NewEipForVMOnHost() is high (> 15) (gocyclo)
    • Line 404: warning: cyclomatic complexity 17 of function (*SElasticip).SyncInstanceWithCloudEip() is high (> 15) (gocyclo)
    • cloudpods/pkg/monitor/models/commonalert.go
    • Line 792: warning: cyclomatic complexity 24 of function (*SCommonAlert).ValidateUpdateData() is high (> 15) (gocyclo)
    • Line 90: warning: cyclomatic complexity 24 of function (*SCommonAlertManager).ValidateCreateData() is high (> 15) (gocyclo)
    • Line 405: warning: cyclomatic complexity 18 of function (*SCommonAlertManager).CustomizeFilterList() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/guestdrivers/managedvirtual.go
    • Line 343: warning: cyclomatic complexity 32 of function (*SManagedVirtualizedGuestDriver).RequestDeployGuestOnHost() is high (> 15) (gocyclo)
    • Line 895: warning: cyclomatic complexity 26 of function (*SManagedVirtualizedGuestDriver).OnGuestDeployTaskDataReceived() is high (> 15) (gocyclo)
    • Line 819: warning: cyclomatic complexity 19 of function (*SManagedVirtualizedGuestDriver).RequestChangeVmConfig() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/snapshotpolicy.go
    • Line 403: warning: cyclomatic complexity 17 of function (*SSnapshotPolicyManager).SyncSnapshotPolicies() is high (> 15) (gocyclo)
    • Line 545: warning: cyclomatic complexity 16 of function (*SSnapshotPolicyManager).newFromCloudSnapshotPolicy() is high (> 15) (gocyclo)
    • cloudpods/pkg/cloudid/models/cloudaccount.go
    • Line 1448: warning: cyclomatic complexity 23 of function (*SCloudaccount).SyncCustomCloudpoliciesForCloud() is high (> 15) (gocyclo)
    • Line 1554: warning: cyclomatic complexity 20 of function (*SCloudaccount).SyncSystemCloudpoliciesForCloud() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/secgroupcache.go
    • Line 434: warning: cyclomatic complexity 23 of function (*SSecurityGroupCacheManager).SyncSecurityGroupCaches() is high (> 15) (gocyclo)
    • Line 757: warning: cyclomatic complexity 19 of function (*SSecurityGroupCache).GetSecuritRuleSet() is high (> 15) (gocyclo)
    • cloudpods/pkg/util/httputils/httputils.go
    • Line 703: warning: cyclomatic complexity 30 of function ParseJSONResponse() is high (> 15) (gocyclo)
    • Line 465: warning: cyclomatic complexity 24 of function requestInternal() is high (> 15) (gocyclo)
    • Line 585: warning: cyclomatic complexity 16 of function (*JsonClient).Send() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/disks.go
    • Line 141: warning: cyclomatic complexity 23 of function (*SDiskManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 1450: warning: cyclomatic complexity 20 of function (*SDisk).syncWithCloudDisk() is high (> 15) (gocyclo)
    • Line 448: warning: cyclomatic complexity 17 of function (*SDiskManager).ValidateCreateData() is high (> 15) (gocyclo)
    • Line 2487: warning: cyclomatic complexity 16 of function (*SDiskManager).AutoSyncExtDiskSnapshot() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/skus.go
    • Line 724: warning: cyclomatic complexity 27 of function (*SServerSkuManager).ListItemFilter() is high (> 15) (gocyclo)
    • Line 293: warning: cyclomatic complexity 23 of function (*SServerSkuManager).ValidateCreateData() is high (> 15) (gocyclo)
    • cloudpods/pkg/compute/models/loadbalancerlisteners.go
    • Line 966: warning: cyclomatic complexity 40 of function (*SLoadbalancerListener).constructFieldsFromCloudListener() is high (> 15) (gocyclo)
    • Line 1141: warning: cyclomatic complexity 22 of function (*SLoadbalancerListener).updateCachedLoadbalancerBackendGroupAssociate() is high (> 15) (gocyclo)

ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (exit status 2)


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!