Preparing report...

Report for github.com/apache/incubator-yunikorn-core

A+    Excellent!    Found 79 issues across 141 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!


golint54%

Golint is a linter for Go source code.

    • incubator-yunikorn-core/pkg/common/security/acl.go
    • Line 32: warning: exported const WildCard should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported type ACL should have comment or be unexported (golint)
    • Line 117: warning: comment on exported function NewACL should be of the form "NewACL ..." (golint)
    • Line 143: warning: comment on exported method ACL.CheckAccess should be of the form "CheckAccess ..." (golint)
    • incubator-yunikorn-core/pkg/scheduler/partition.go
    • Line 45: warning: exported type PartitionContext should have comment or be unexported (golint)
    • Line 295: warning: comment on exported method PartitionContext.AddApplication should be of the form "AddApplication ..." (golint)
    • Line 450: warning: comment on exported method PartitionContext.GetQueue should be of the form "GetQueue ..." (golint)
    • Line 482: warning: comment on exported method PartitionContext.GetQueueInfos should be of the form "GetQueueInfos ..." (golint)
    • Line 487: warning: comment on exported method PartitionContext.GetPartitionQueues should be of the form "GetPartitionQueues ..." (golint)
    • Line 537: warning: comment on exported method PartitionContext.GetNode should be of the form "GetNode ..." (golint)
    • Line 568: warning: comment on exported method PartitionContext.AddNode should be of the form "AddNode ..." (golint)
    • Line 933: warning: comment on exported method PartitionContext.GetNodeIterator should be of the form "GetNodeIterator ..." (golint)
    • Line 965: warning: exported method PartitionContext.GetTotalPartitionResource should have comment or be unexported (golint)
    • Line 972: warning: exported method PartitionContext.GetAllocatedResource should have comment or be unexported (golint)
    • Line 979: warning: exported method PartitionContext.GetTotalApplicationCount should have comment or be unexported (golint)
    • Line 985: warning: exported method PartitionContext.GetTotalAllocationCount should have comment or be unexported (golint)
    • Line 991: warning: exported method PartitionContext.GetTotalNodeCount should have comment or be unexported (golint)
    • Line 997: warning: exported method PartitionContext.GetApplications should have comment or be unexported (golint)
    • Line 1007: warning: exported method PartitionContext.GetCompletedApplications should have comment or be unexported (golint)
    • Line 1017: warning: exported method PartitionContext.GetAppsByState should have comment or be unexported (golint)
    • Line 1038: warning: exported method PartitionContext.GetAppsInTerminatedState should have comment or be unexported (golint)
    • Line 1046: warning: exported method PartitionContext.GetNodes should have comment or be unexported (golint)
    • Line 1322: warning: exported method PartitionContext.GetCurrentState should have comment or be unexported (golint)
    • Line 1326: warning: exported method PartitionContext.GetStateTime should have comment or be unexported (golint)
    • Line 1332: warning: exported method PartitionContext.GetNodeSortingPolicy should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/scheduler/objects/allocation_ask.go
    • Line 34: warning: exported type AllocationAsk should have comment or be unexported (golint)
    • Line 55: warning: exported function NewAllocationAsk should have comment or be unexported (golint)
    • Line 102: warning: comment on exported method AllocationAsk.GetPendingAskRepeat should be of the form "GetPendingAskRepeat ..." (golint)
    • Line 109: warning: comment on exported method AllocationAsk.GetCreateTime should be of the form "GetCreateTime ..." (golint)
    • incubator-yunikorn-core/pkg/trace/scheduler_trace_context.go
    • Line 67: warning: exported method SchedulerTraceContextImpl.ActiveSpan should have comment or be unexported (golint)
    • Line 74: warning: exported method SchedulerTraceContextImpl.StartSpan should have comment or be unexported (golint)
    • Line 88: warning: exported method SchedulerTraceContextImpl.FinishActiveSpan should have comment or be unexported (golint)
    • Line 128: warning: exported method DelaySchedulerTraceContextImpl.ActiveSpan should have comment or be unexported (golint)
    • Line 135: warning: exported method DelaySchedulerTraceContextImpl.StartSpan should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/plugins/types.go
    • Line 27: warning: exported type SchedulerPlugins should have comment or be unexported (golint)
    • Line 37: warning: comment on exported type PredicatesPlugin should be of the form "PredicatesPlugin ..." (with optional leading article) (golint)
    • Line 44: warning: exported type ReconcilePlugin should have comment or be unexported (golint)
    • Line 51: warning: exported type EventPlugin should have comment or be unexported (golint)
    • Line 57: warning: comment on exported type ContainerSchedulingStateUpdater should be of the form "ContainerSchedulingStateUpdater ..." (with optional leading article) (golint)
    • Line 67: warning: exported type ConfigurationPlugin should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/webservice/dao/scheduler-health.go
    • Line 21: warning: exported type SchedulerHealthDAOInfo should have comment or be unexported (golint)
    • Line 26: warning: exported type HealthCheckInfo should have comment or be unexported (golint)
    • Line 33: warning: exported method SchedulerHealthDAOInfo.SetHealthStatus should have comment or be unexported (golint)
    • Line 37: warning: exported method SchedulerHealthDAOInfo.AddHealthCheckInfo should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/metrics/init.go
    • Line 27: warning: comment on exported const Namespace should be of the form "Namespace ..." (golint)
    • Line 33: warning: comment on exported const MetricNameInvalidByteReplacement should be of the form "MetricNameInvalidByteReplacement ..." (golint)
    • Line 40: warning: exported type Metrics should have comment or be unexported (golint)
    • Line 47: warning: exported type CoreQueueMetrics should have comment or be unexported (golint)
    • Line 55: warning: comment on exported type CoreSchedulerMetrics should be of the form "CoreSchedulerMetrics ..." (with optional leading article) (golint)
    • Line 121: warning: exported type CoreEventMetrics should have comment or be unexported (golint)
    • Line 142: warning: exported function GetSchedulerMetrics should have comment or be unexported (golint)
    • Line 146: warning: exported function GetQueueMetrics should have comment or be unexported (golint)
    • Line 157: warning: exported function GetEventMetrics should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/scheduler/placement/placement.go
    • Line 33: warning: exported type AppPlacementManager should have comment or be unexported (golint)
    • Line 42: warning: exported function NewPlacementManager should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method AppPlacementManager.UpdateRules should be of the form "UpdateRules ..." (golint)
    • Line 80: warning: comment on exported method AppPlacementManager.IsInitialised should be of the form "IsInitialised ..." (golint)
    • Line 135: warning: exported method AppPlacementManager.PlaceApplication should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/scheduler/objects/object_state.go
    • Line 28: warning: comment on exported type ObjectEvent should be of the form "ObjectEvent ..." (with optional leading article) (golint)
    • Line 35: warning: exported const Remove should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: comment on exported type ObjectState should be of the form "ObjectState ..." (with optional leading article) (golint)
    • Line 51: warning: exported const Active should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported function NewObjectState should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/metrics/history/internal_metrics.go
    • Line 26: warning: comment on exported type InternalMetricsHistory should be of the form "InternalMetricsHistory ..." (with optional leading article) (golint)
    • Line 45: warning: exported function NewInternalMetricsHistory should have comment or be unexported (golint)
    • Line 52: warning: exported method InternalMetricsHistory.Store should have comment or be unexported (golint)
    • Line 67: warning: comment on exported method InternalMetricsHistory.GetRecords should be of the form "GetRecords ..." (golint)
    • Line 79: warning: exported method InternalMetricsHistory.GetLimit should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/events/event_cache.go
    • Line 34: warning: exported type EventCache should have comment or be unexported (golint)
    • Line 43: warning: exported function GetEventCache should have comment or be unexported (golint)
    • Line 47: warning: exported function CreateAndSetEventCache should have comment or be unexported (golint)
    • Line 64: warning: exported method EventCache.StartService should have comment or be unexported (golint)
    • Line 83: warning: exported method EventCache.Stop should have comment or be unexported (golint)
    • Line 94: warning: exported method EventCache.AddEvent should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/common/configs/config.go
    • Line 35: warning: comment on exported type SchedulerConfig should be of the form "SchedulerConfig ..." (with optional leading article) (golint)
    • Line 42: warning: comment on exported type PartitionConfig should be of the form "PartitionConfig ..." (with optional leading article) (golint)
    • Line 57: warning: exported type PartitionPreemptionConfig should have comment or be unexported (golint)
    • Line 61: warning: comment on exported type QueueConfig should be of the form "QueueConfig ..." (with optional leading article) (golint)
    • Line 81: warning: comment on exported type Resources should be of the form "Resources ..." (with optional leading article) (golint)
    • Line 90: warning: comment on exported type PlacementRule should be of the form "PlacementRule ..." (with optional leading article) (golint)
    • Line 105: warning: comment on exported type Filter should be of the form "Filter ..." (with optional leading article) (golint)
    • Line 116: warning: comment on exported type Limits should be of the form "Limits ..." (with optional leading article) (golint)
    • Line 121: warning: comment on exported type Limit should be of the form "Limit ..." (with optional leading article) (golint)
    • Line 136: warning: comment on exported type NodeSortingPolicy should be of the form "NodeSortingPolicy ..." (with optional leading article) (golint)
    • Line 142: warning: exported type LoadSchedulerConfigFunc should have comment or be unexported (golint)
    • Line 144: warning: comment on exported function LoadSchedulerConfigFromByteArray should be of the form "LoadSchedulerConfigFromByteArray ..." (golint)
    • Line 155: warning: exported function SetChecksum should have comment or be unexported (golint)
    • Line 160: warning: exported function ParseAndValidateConfig should have comment or be unexported (golint)
    • Line 208: warning: exported function GetConfigurationString should have comment or be unexported (golint)
    • Line 222: warning: comment on exported var SchedulerConfigLoader should be of the form "SchedulerConfigLoader ..." (golint)
    • incubator-yunikorn-core/pkg/rmproxy/rmevent/events.go
    • Line 25: warning: comment on exported type RMUpdateRequestEvent should be of the form "RMUpdateRequestEvent ..." (with optional leading article) (golint)
    • Line 32: warning: comment on exported type RMRegistrationEvent should be of the form "RMRegistrationEvent ..." (with optional leading article) (golint)
    • Line 38: warning: exported type RMConfigUpdateEvent should have comment or be unexported (golint)
    • Line 43: warning: exported type RMPartitionsRemoveEvent should have comment or be unexported (golint)
    • Line 48: warning: exported type Result should have comment or be unexported (golint)
    • Line 53: warning: comment on exported type RMNewAllocationsEvent should be of the form "RMNewAllocationsEvent ..." (with optional leading article) (golint)
    • Line 60: warning: exported type RMApplicationUpdateEvent should have comment or be unexported (golint)
    • Line 67: warning: exported type RMRejectedAllocationAskEvent should have comment or be unexported (golint)
    • Line 72: warning: exported type RMReleaseAllocationEvent should have comment or be unexported (golint)
    • Line 77: warning: exported type RMReleaseAllocationAskEvent should have comment or be unexported (golint)
    • Line 82: warning: exported type RMNodeUpdateEvent should have comment or be unexported (golint)
    • incubator-yunikorn-core/cmd/simplescheduler/simplescheduler.go
    • Line 31: warning: exported type SimpleScheduler should have comment or be unexported (golint)
    • Line 34: warning: exported method SimpleScheduler.Run should have comment or be unexported (golint)
    • Line 46: warning: exported method SimpleScheduler.RegisterResourceManager should have comment or be unexported (golint)
    • Line 52: warning: exported method SimpleScheduler.Update should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/trace/scheduler_tracer.go
    • Line 38: warning: exported type SchedulerTracerImpl should have comment or be unexported (golint)
    • Line 45: warning: exported type SchedulerTracerImplParams should have comment or be unexported (golint)
    • Line 51: warning: exported const Sampling should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported var DefaultSchedulerTracerImplParams should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/plugins/plugins.go
    • Line 31: warning: exported function RegisterSchedulerPlugin should have comment or be unexported (golint)
    • Line 57: warning: exported function GetPredicatesPlugin should have comment or be unexported (golint)
    • Line 64: warning: exported function GetReconcilePlugin should have comment or be unexported (golint)
    • Line 71: warning: exported function GetEventPlugin should have comment or be unexported (golint)
    • Line 78: warning: exported function GetContainerSchedulingStateUpdaterPlugin should have comment or be unexported (golint)
    • Line 85: warning: exported function GetConfigPlugin should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/metrics/scheduler.go
    • Line 201: warning: exported method SchedulerMetrics.ObserveSchedulingLatency should have comment or be unexported (golint)
    • Line 205: warning: exported method SchedulerMetrics.ObserveNodeSortingLatency should have comment or be unexported (golint)
    • Line 209: warning: exported method SchedulerMetrics.ObserveAppSortingLatency should have comment or be unexported (golint)
    • Line 213: warning: exported method SchedulerMetrics.ObserveQueueSortingLatency should have comment or be unexported (golint)
    • Line 219: warning: exported method SchedulerMetrics.IncAllocatedContainer should have comment or be unexported (golint)
    • Line 223: warning: exported method SchedulerMetrics.AddAllocatedContainers should have comment or be unexported (golint)
    • Line 236: warning: exported method SchedulerMetrics.IncReleasedContainer should have comment or be unexported (golint)
    • Line 240: warning: exported method SchedulerMetrics.AddReleasedContainers should have comment or be unexported (golint)
    • Line 255: warning: exported method SchedulerMetrics.IncRejectedContainer should have comment or be unexported (golint)
    • Line 259: warning: exported method SchedulerMetrics.AddRejectedContainers should have comment or be unexported (golint)
    • Line 263: warning: exported method SchedulerMetrics.IncSchedulingError should have comment or be unexported (golint)
    • Line 267: warning: exported method SchedulerMetrics.AddSchedulingErrors should have comment or be unexported (golint)
    • Line 271: warning: exported method SchedulerMetrics.GetSchedulingErrors should have comment or be unexported (golint)
    • Line 280: warning: exported method SchedulerMetrics.IncTotalApplicationsAdded should have comment or be unexported (golint)
    • Line 284: warning: exported method SchedulerMetrics.AddTotalApplicationsAdded should have comment or be unexported (golint)
    • Line 288: warning: exported method SchedulerMetrics.IncTotalApplicationsRejected should have comment or be unexported (golint)
    • Line 292: warning: exported method SchedulerMetrics.AddTotalApplicationsRejected should have comment or be unexported (golint)
    • Line 296: warning: exported method SchedulerMetrics.IncTotalApplicationsRunning should have comment or be unexported (golint)
    • Line 300: warning: exported method SchedulerMetrics.AddTotalApplicationsRunning should have comment or be unexported (golint)
    • Line 304: warning: exported method SchedulerMetrics.DecTotalApplicationsRunning should have comment or be unexported (golint)
    • Line 308: warning: exported method SchedulerMetrics.SubTotalApplicationsRunning should have comment or be unexported (golint)
    • Line 312: warning: exported method SchedulerMetrics.SetTotalApplicationsRunning should have comment or be unexported (golint)
    • Line 325: warning: exported method SchedulerMetrics.IncTotalApplicationsCompleted should have comment or be unexported (golint)
    • Line 329: warning: exported method SchedulerMetrics.AddTotalApplicationsCompleted should have comment or be unexported (golint)
    • Line 333: warning: exported method SchedulerMetrics.DecTotalApplicationsCompleted should have comment or be unexported (golint)
    • Line 337: warning: exported method SchedulerMetrics.SubTotalApplicationsCompleted should have comment or be unexported (golint)
    • Line 341: warning: exported method SchedulerMetrics.SetTotalApplicationsCompleted should have comment or be unexported (golint)
    • Line 345: warning: exported method SchedulerMetrics.IncActiveNodes should have comment or be unexported (golint)
    • Line 349: warning: exported method SchedulerMetrics.AddActiveNodes should have comment or be unexported (golint)
    • Line 353: warning: exported method SchedulerMetrics.DecActiveNodes should have comment or be unexported (golint)
    • Line 357: warning: exported method SchedulerMetrics.SubActiveNodes should have comment or be unexported (golint)
    • Line 361: warning: exported method SchedulerMetrics.SetActiveNodes should have comment or be unexported (golint)
    • Line 365: warning: exported method SchedulerMetrics.IncFailedNodes should have comment or be unexported (golint)
    • Line 369: warning: exported method SchedulerMetrics.AddFailedNodes should have comment or be unexported (golint)
    • Line 373: warning: exported method SchedulerMetrics.DecFailedNodes should have comment or be unexported (golint)
    • Line 377: warning: exported method SchedulerMetrics.SubFailedNodes should have comment or be unexported (golint)
    • Line 381: warning: exported method SchedulerMetrics.SetFailedNodes should have comment or be unexported (golint)
    • Line 384: warning: exported method SchedulerMetrics.GetFailedNodes should have comment or be unexported (golint)
    • Line 393: warning: exported method SchedulerMetrics.SetNodeResourceUsage should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/common/configs/configs.go
    • Line 24: warning: exported const SchedulerConfigPath should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported var ConfigMap should have comment or be unexported (golint)
    • Line 29: warning: exported var ConfigContext should have comment or be unexported (golint)
    • Line 39: warning: comment on exported type SchedulerConfigContext should be of the form "SchedulerConfigContext ..." (with optional leading article) (golint)
    • Line 45: warning: exported method SchedulerConfigContext.Set should have comment or be unexported (golint)
    • Line 51: warning: exported method SchedulerConfigContext.Get should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/scheduler/objects/allocation.go
    • Line 35: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: comment on exported type Allocation should be of the form "Allocation ..." (with optional leading article) (golint)
    • Line 67: warning: exported function NewAllocation should have comment or be unexported (golint)
    • Line 91: warning: comment on exported function NewAllocationFromSI should be of the form "NewAllocationFromSI ..." (golint)
    • Line 121: warning: comment on exported method Allocation.NewSIFromAllocation should be of the form "NewSIFromAllocation ..." (golint)
    • Line 151: warning: exported method Allocation.IsPlaceholder should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/common/security/usergroup.go
    • Line 44: warning: comment on exported type UserGroupCache should be of the form "UserGroupCache ..." (with optional leading article) (golint)
    • Line 55: warning: comment on exported type UserGroup should be of the form "UserGroup ..." (with optional leading article) (golint)
    • Line 63: warning: comment on exported function GetUserGroupCache should be of the form "GetUserGroupCache ..." (golint)
    • Line 125: warning: exported method UserGroupCache.ConvertUGI should have comment or be unexported (golint)
    • Line 144: warning: comment on exported method UserGroupCache.GetUserGroup should be of the form "GetUserGroup ..." (golint)
    • incubator-yunikorn-core/pkg/common/configs/configwatcher.go
    • Line 34: warning: exported const DefaultConfigWatcherDuration should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: comment on exported type ConfigWatcher should be of the form "ConfigWatcher ..." (with optional leading article) (golint)
    • Line 49: warning: comment on exported type ConfigReloader should be of the form "ConfigReloader ..." (with optional leading article) (golint)
    • Line 54: warning: exported function CreateConfigWatcher should have comment or be unexported (golint)
    • Line 64: warning: exported function GetInstance should have comment or be unexported (golint)
    • Line 76: warning: exported method ConfigWatcher.RegisterCallback should have comment or be unexported (golint)
    • Line 111: warning: comment on exported method ConfigWatcher.Run should be of the form "Run ..." (golint)
    • incubator-yunikorn-core/pkg/metrics/queue.go
    • Line 31: warning: exported type QueueMetrics should have comment or be unexported (golint)
    • Line 103: warning: exported method QueueMetrics.IncApplicationsAccepted should have comment or be unexported (golint)
    • Line 107: warning: exported method QueueMetrics.IncApplicationsRejected should have comment or be unexported (golint)
    • Line 111: warning: exported method QueueMetrics.IncApplicationsCompleted should have comment or be unexported (golint)
    • Line 115: warning: exported method QueueMetrics.AddQueueUsedResourceMetrics should have comment or be unexported (golint)
    • Line 119: warning: exported method QueueMetrics.SetQueueUsedResourceMetrics should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/common/configs/configvalidator.go
    • Line 35: warning: exported const RootQueue should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: comment on exported const ApplicationSortPolicy should be of the form "ApplicationSortPolicy ..." (golint)
    • Line 43: warning: comment on exported var QueueNameRegExp should be of the form "QueueNameRegExp ..." (golint)
    • Line 47: warning: comment on exported var UserRegExp should be of the form "UserRegExp ..." (golint)
    • Line 51: warning: comment on exported var GroupRegExp should be of the form "GroupRegExp ..." (golint)
    • Line 54: warning: comment on exported var SpecialRegExp should be of the form "SpecialRegExp ..." (golint)
    • Line 57: warning: comment on exported var RuleNameRegExp should be of the form "RuleNameRegExp ..." (golint)
    • Line 360: warning: comment on exported function Validate should be of the form "Validate ..." (golint)
    • incubator-yunikorn-core/pkg/common/resources/resources.go
    • Line 41: warning: exported type Resource should have comment or be unexported (golint)
    • Line 45: warning: comment on exported type Quantity should be of the form "Quantity ..." (with optional leading article) (golint)
    • Line 52: warning: comment on exported var Zero should be of the form "Zero ..." (golint)
    • Line 55: warning: exported function NewResource should have comment or be unexported (golint)
    • Line 59: warning: exported function NewResourceFromProto should have comment or be unexported (golint)
    • Line 70: warning: exported function NewResourceFromMap should have comment or be unexported (golint)
    • Line 74: warning: comment on exported function NewResourceFromString should be of the form "NewResourceFromString ..." (golint)
    • Line 84: warning: comment on exported function NewResourceFromConf should be of the form "NewResourceFromConf ..." (golint)
    • Line 109: warning: exported method Resource.DAOString should have comment or be unexported (golint)
    • Line 116: warning: comment on exported method Resource.ToProto should be of the form "ToProto ..." (golint)
    • Line 129: warning: comment on exported method Resource.Clone should be of the form "Clone ..." (golint)
    • Line 143: warning: comment on exported method Resource.AddTo should be of the form "AddTo ..." (golint)
    • Line 158: warning: comment on exported method Resource.SubFrom should be of the form "SubFrom ..." (golint)
    • Line 173: warning: comment on exported method Resource.MultiplyTo should be of the form "MultiplyTo ..." (golint)
    • Line 183: warning: comment on exported method Resource.FitInScore should be of the form "FitInScore ..." (golint)
    • Line 329: warning: comment on exported function Sub should be of the form "Sub ..." (golint)
    • Line 349: warning: comment on exported function SubErrorNegative should be of the form "SubErrorNegative ..." (golint)
    • Line 362: warning: comment on exported function SubEliminateNegative should be of the form "SubEliminateNegative ..." (golint)
    • Line 399: warning: comment on exported function FitIn should be of the form "FitIn ..." (golint)
    • Line 406: warning: comment on exported method Resource.FitInMaxUndef should be of the form "FitInMaxUndef ..." (golint)
    • Line 489: warning: comment on exported function CompUsageRatio should be of the form "CompUsageRatio ..." (golint)
    • Line 501: warning: comment on exported function CompUsageRatioSeparately should be of the form "CompUsageRatioSeparately ..." (golint)
    • Line 513: warning: comment on exported function CompUsageShares should be of the form "CompUsageShares ..." (golint)
    • Line 526: warning: comment on exported function FairnessRatio should be of the form "FairnessRatio ..." (golint)
    • Line 602: warning: comment on exported function Equals should be of the form "Equals ..." (golint)
    • Line 632: warning: comment on exported function EqualsOrEmpty should be of the form "EqualsOrEmpty ..." (golint)
    • Line 663: warning: comment on exported function MultiplyBy should be of the form "MultiplyBy ..." (golint)
    • Line 678: warning: comment on exported function StrictlyGreaterThan should be of the form "StrictlyGreaterThan ..." (golint)
    • Line 714: warning: comment on exported function StrictlyGreaterThanOrEquals should be of the form "StrictlyGreaterThanOrEquals ..." (golint)
    • Line 738: warning: comment on exported function StrictlyGreaterThanZero should be of the form "StrictlyGreaterThanZero ..." (golint)
    • Line 756: warning: comment on exported function MinQuantity should be of the form "MinQuantity ..." (golint)
    • Line 764: warning: comment on exported function MaxQuantity should be of the form "MaxQuantity ..." (golint)
    • Line 772: warning: comment on exported function ComponentWiseMin should be of the form "ComponentWiseMin ..." (golint)
    • Line 788: warning: comment on exported function ComponentWiseMinPermissive should be of the form "ComponentWiseMinPermissive ..." (golint)
    • Line 819: warning: exported method Resource.HasNegativeValue should have comment or be unexported (golint)
    • Line 831: warning: comment on exported function ComponentWiseMax should be of the form "ComponentWiseMax ..." (golint)
    • Line 846: warning: comment on exported function IsZero should be of the form "IsZero ..." (golint)
    • Line 860: warning: exported function CalculateAbsUsedCapacity should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/webservice/dao/partition_info.go
    • Line 1: warning: package comment should be of the form "Package dao ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 20: warning: exported type PartitionDAOInfo should have comment or be unexported (golint)
    • Line 27: warning: exported type PartitionInfo should have comment or be unexported (golint)
    • Line 36: warning: exported type PartitionCapacity should have comment or be unexported (golint)
    • Line 41: warning: exported type NodeInfo should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/scheduler/scheduler.go
    • Line 34: warning: comment on exported type Scheduler should be of the form "Scheduler ..." (with optional leading article) (golint)
    • Line 41: warning: exported function NewScheduler should have comment or be unexported (golint)
    • Line 48: warning: comment on exported method Scheduler.StartService should be of the form "StartService ..." (golint)
    • Line 89: warning: comment on exported method Scheduler.HandleEvent should be of the form "HandleEvent ..." (golint)
    • Line 157: warning: comment on exported method Scheduler.GetClusterContext should be of the form "GetClusterContext ..." (golint)
    • Line 162: warning: comment on exported method Scheduler.MultiStepSchedule should be of the form "MultiStepSchedule ..." (golint)
    • incubator-yunikorn-core/pkg/events/events.go
    • Line 46: warning: exported function CreateRequestEventRecord should have comment or be unexported (golint)
    • Line 50: warning: exported function CreateAppEventRecord should have comment or be unexported (golint)
    • Line 54: warning: exported function CreateNodeEventRecord should have comment or be unexported (golint)
    • Line 58: warning: exported function CreateQueueEventRecord should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/log/logger.go
    • Line 34: warning: exported function Logger should have comment or be unexported (golint)
    • Line 54: warning: exported function IsDebugEnabled should have comment or be unexported (golint)
    • Line 71: warning: comment on exported function InitAndSetLevel should be of the form "InitAndSetLevel ..." (golint)
    • incubator-yunikorn-core/pkg/webservice/dao/queue_info.go
    • Line 1: warning: package comment should be of the form "Package dao ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 20: warning: exported type QueueDAOInfo should have comment or be unexported (golint)
    • Line 28: warning: exported type QueueCapacity should have comment or be unexported (golint)
    • Line 35: warning: exported type PartitionQueueDAOInfo should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/common/utils.go
    • Line 34: warning: exported function GetNormalizedPartitionName should have comment or be unexported (golint)
    • Line 46: warning: exported function GetRMIdFromPartitionName should have comment or be unexported (golint)
    • Line 55: warning: exported function GetPartitionNameWithoutClusterID should have comment or be unexported (golint)
    • Line 63: warning: exported function WaitFor should have comment or be unexported (golint)
    • Line 77: warning: comment on exported function GetNewUUID should be of the form "GetNewUUID ..." (golint)
    • Line 83: warning: exported function GetBoolEnvVar should have comment or be unexported (golint)
    • Line 98: warning: comment on exported function ConvertSITimeout should be of the form "ConvertSITimeout ..." (golint)
    • incubator-yunikorn-core/pkg/scheduler/objects/queue.go
    • Line 40: warning: exported const AppTagNamespaceResourceQuota should have comment or be unexported (golint)
    • Line 42: warning: comment on exported type Queue should be of the form "Queue ..." (with optional leading article) (golint)
    • Line 86: warning: comment on exported function NewConfiguredQueue should be of the form "NewConfiguredQueue ..." (golint)
    • Line 119: warning: comment on exported function NewDynamicQueue should be of the form "NewDynamicQueue ..." (golint)
    • Line 206: warning: exported method Queue.SetQueueConfig should have comment or be unexported (golint)
    • Line 272: warning: comment on exported method Queue.UpdateSortType should be of the form "UpdateSortType ..." (golint)
    • Line 305: warning: exported method Queue.GetQueuePath should have comment or be unexported (golint)
    • Line 311: warning: comment on exported method Queue.IsDraining should be of the form "IsDraining ..." (golint)
    • Line 317: warning: comment on exported method Queue.IsRunning should be of the form "IsRunning ..." (golint)
    • Line 322: warning: comment on exported method Queue.IsStopped should be of the form "IsStopped ..." (golint)
    • Line 327: warning: comment on exported method Queue.CurrentState should be of the form "CurrentState ..." (golint)
    • Line 348: warning: comment on exported method Queue.GetAllocatedResource should be of the form "GetAllocatedResource ..." (golint)
    • Line 355: warning: comment on exported method Queue.GetGuaranteedResource should be of the form "GetGuaranteedResource ..." (golint)
    • Line 362: warning: comment on exported method Queue.CheckSubmitAccess should be of the form "CheckSubmitAccess ..." (golint)
    • Line 374: warning: comment on exported method Queue.CheckAdminAccess should be of the form "CheckAdminAccess ..." (golint)
    • Line 387: warning: exported method Queue.GetQueueInfos should have comment or be unexported (golint)
    • Line 412: warning: exported method Queue.GetPartitionQueues should have comment or be unexported (golint)
    • Line 436: warning: comment on exported method Queue.GetPendingResource should be of the form "GetPendingResource ..." (golint)
    • Line 476: warning: comment on exported method Queue.AddApplication should be of the form "AddApplication ..." (golint)
    • Line 511: warning: comment on exported method Queue.RemoveApplication should be of the form "RemoveApplication ..." (golint)
    • Line 544: warning: comment on exported method Queue.GetCopyOfApps should be of the form "GetCopyOfApps ..." (golint)
    • Line 555: warning: comment on exported method Queue.GetCopyOfChildren should be of the form "GetCopyOfChildren ..." (golint)
    • Line 569: warning: comment on exported method Queue.IsEmpty should be of the form "IsEmpty ..." (golint)
    • Line 608: warning: comment on exported method Queue.MarkQueueForRemoval should be of the form "MarkQueueForRemoval ..." (golint)
    • Line 633: warning: comment on exported method Queue.GetChildQueue should be of the form "GetChildQueue ..." (golint)
    • Line 641: warning: comment on exported method Queue.RemoveQueue should be of the form "RemoveQueue ..." (golint)
    • Line 661: warning: comment on exported method Queue.IsLeafQueue should be of the form "IsLeafQueue ..." (golint)
    • Line 668: warning: comment on exported method Queue.IsManaged should be of the form "IsManaged ..." (golint)
    • Line 680: warning: comment on exported method Queue.GetPreemptingResource should be of the form "GetPreemptingResource ..." (golint)
    • Line 687: warning: comment on exported method Queue.IncPreemptingResource should be of the form "IncPreemptingResource ..." (golint)
    • Line 715: warning: comment on exported method Queue.IncAllocatedResource should be of the form "IncAllocatedResource ..." (golint)
    • Line 745: warning: comment on exported method Queue.DecAllocatedResource should be of the form "DecAllocatedResource ..." (golint)
    • Line 866: warning: comment on exported method Queue.GetMaxResource should be of the form "GetMaxResource ..." (golint)
    • Line 881: warning: comment on exported method Queue.GetMaxQueueSet should be of the form "GetMaxQueueSet ..." (golint)
    • Line 912: warning: comment on exported method Queue.SetMaxResource should be of the form "SetMaxResource ..." (golint)
    • Line 926: warning: comment on exported method Queue.TryAllocate should be of the form "TryAllocate ..." (golint)
    • Line 958: warning: comment on exported method Queue.TryPlaceholderAllocate should be of the form "TryPlaceholderAllocate ..." (golint)
    • Line 988: warning: exported method Queue.GetQueueOutstandingRequests should have comment or be unexported (golint)
    • Line 1005: warning: comment on exported method Queue.TryReservedAllocate should be of the form "TryReservedAllocate ..." (golint)
    • Line 1067: warning: comment on exported method Queue.Reserve should be of the form "Reserve ..." (golint)
    • Line 1076: warning: comment on exported method Queue.UnReserve should be of the form "UnReserve ..." (golint)
    • Line 1106: warning: comment on exported method Queue.SupportTaskGroup should be of the form "SupportTaskGroup ..." (golint)
    • incubator-yunikorn-core/pkg/scheduler/policies/nodesorting_policy.go
    • Line 29: warning: exported type NodeSortingPolicy should have comment or be unexported (golint)
    • Line 33: warning: exported type SortingPolicy should have comment or be unexported (golint)
    • Line 36: warning: exported const BinPackingPolicy should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: exported function FromString should have comment or be unexported (golint)
    • Line 57: warning: exported function NewNodeSortingPolicy should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/common/server.go
    • Line 36: warning: comment on exported type NonBlockingGRPCServer should be of the form "NonBlockingGRPCServer ..." (with optional leading article) (golint)
    • Line 48: warning: exported function NewNonBlockingGRPCServer should have comment or be unexported (golint)
    • Line 76: warning: exported function ParseEndpoint should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/scheduler/context.go
    • Line 44: warning: exported type ClusterContext should have comment or be unexported (golint)
    • Line 56: warning: comment on exported function NewClusterContext should be of the form "NewClusterContext ..." (golint)
    • Line 256: warning: comment on exported method ClusterContext.UpdateSchedulerConfig should be of the form "UpdateSchedulerConfig ..." (golint)
    • Line 276: warning: comment on exported method ClusterContext.UpdateRMSchedulerConfig should be of the form "UpdateRMSchedulerConfig ..." (golint)
    • Line 351: warning: comment on exported method ClusterContext.GetPolicyGroup should be of the form "GetPolicyGroup ..." (golint)
    • Line 358: warning: exported method ClusterContext.GetPartitionMapClone should have comment or be unexported (golint)
    • Line 369: warning: exported method ClusterContext.GetPartition should have comment or be unexported (golint)
    • Line 375: warning: comment on exported method ClusterContext.GetApplication should be of the form "GetApplication ..." (golint)
    • Line 389: warning: comment on exported method ClusterContext.GetQueue should be of the form "GetQueue ..." (golint)
    • Line 403: warning: comment on exported method ClusterContext.GetReservations should be of the form "GetReservations ..." (golint)
    • Line 508: warning: exported method ClusterContext.NeedPreemption should have comment or be unexported (golint)
    • Line 820: warning: comment on exported method ClusterContext.GetNode should be of the form "GetNode ..." (golint)
    • incubator-yunikorn-core/pkg/scheduler/objects/node.go
    • Line 35: warning: exported type Node should have comment or be unexported (golint)
    • Line 58: warning: exported function NewNode should have comment or be unexported (golint)
    • Line 104: warning: comment on exported method Node.GetAttribute should be of the form "GetAttribute ..." (golint)
    • Line 111: warning: comment on exported method Node.GetReservations should be of the form "GetReservations ..." (golint)
    • Line 124: warning: exported method Node.GetCapacity should have comment or be unexported (golint)
    • Line 130: warning: exported method Node.SetCapacity should have comment or be unexported (golint)
    • Line 143: warning: exported method Node.GetOccupiedResource should have comment or be unexported (golint)
    • Line 149: warning: exported method Node.SetOccupiedResource should have comment or be unexported (golint)
    • Line 176: warning: comment on exported method Node.GetAllocation should be of the form "GetAllocation ..." (golint)
    • Line 185: warning: comment on exported method Node.GetAllAllocations should be of the form "GetAllAllocations ..." (golint)
    • Line 198: warning: comment on exported method Node.SetSchedulable should be of the form "SetSchedulable ..." (golint)
    • Line 207: warning: comment on exported method Node.IsSchedulable should be of the form "IsSchedulable ..." (golint)
    • Line 214: warning: comment on exported method Node.GetAllocatedResource should be of the form "GetAllocatedResource ..." (golint)
    • Line 221: warning: comment on exported method Node.GetAvailableResource should be of the form "GetAvailableResource ..." (golint)
    • Line 228: warning: exported method Node.FitInNode should have comment or be unexported (golint)
    • Line 242: warning: comment on exported method Node.IncPreemptingResource should be of the form "IncPreemptingResource ..." (golint)
    • Line 262: warning: comment on exported method Node.RemoveAllocation should be of the form "RemoveAllocation ..." (golint)
    • Line 281: warning: comment on exported method Node.AddAllocation should be of the form "AddAllocation ..." (golint)
    • Line 301: warning: comment on exported method Node.ReplaceAllocation should be of the form "ReplaceAllocation ..." (golint)
    • Line 311: warning: comment on exported method Node.CanAllocate should be of the form "CanAllocate ..." (golint)
    • Line 398: warning: comment on exported method Node.IsReserved should be of the form "IsReserved ..." (golint)
    • Line 483: warning: comment on exported method Node.UnReserveApps should be of the form "UnReserveApps ..." (golint)
    • incubator-yunikorn-core/pkg/rmproxy/rmproxy.go
    • Line 40: warning: comment on exported type RMProxy should be of the form "RMProxy ..." (with optional leading article) (golint)
    • Line 56: warning: exported method RMProxy.GetRMEventHandler should have comment or be unexported (golint)
    • Line 72: warning: exported method RMProxy.HandleEvent should have comment or be unexported (golint)
    • Line 76: warning: exported function NewRMProxy should have comment or be unexported (golint)
    • Line 85: warning: exported method RMProxy.StartService should have comment or be unexported (golint)
    • Line 212: warning: exported method RMProxy.RegisterResourceManager should have comment or be unexported (golint)
    • Line 268: warning: exported method RMProxy.GetResourceManagerCallback should have comment or be unexported (golint)
    • Line 330: warning: exported method RMProxy.Update should have comment or be unexported (golint)
    • Line 343: warning: comment on exported method RMProxy.ReloadConfiguration should be of the form "ReloadConfiguration ..." (golint)
    • incubator-yunikorn-core/pkg/scheduler/policies/sorting_policy.go
    • Line 25: warning: comment on exported type SortPolicy should be of the form "SortPolicy ..." (with optional leading article) (golint)
    • Line 29: warning: exported const FifoSortPolicy should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported function SortPolicyFromString should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/scheduler/objects/application.go
    • Line 50: warning: exported type Application should have comment or be unexported (golint)
    • Line 80: warning: exported function NewApplication should have comment or be unexported (golint)
    • Line 115: warning: exported method Application.SetState should have comment or be unexported (golint)
    • Line 119: warning: comment on exported function SetReservationDelay should be of the form "SetReservationDelay ..." (golint)
    • Line 127: warning: comment on exported method Application.CurrentState should be of the form "CurrentState ..." (golint)
    • Line 133: warning: exported method Application.IsStarting should have comment or be unexported (golint)
    • Line 137: warning: exported method Application.IsAccepted should have comment or be unexported (golint)
    • Line 141: warning: exported method Application.IsNew should have comment or be unexported (golint)
    • Line 145: warning: exported method Application.IsRunning should have comment or be unexported (golint)
    • Line 149: warning: exported method Application.IsCompleting should have comment or be unexported (golint)
    • Line 153: warning: exported method Application.IsCompleted should have comment or be unexported (golint)
    • Line 157: warning: exported method Application.IsExpired should have comment or be unexported (golint)
    • Line 161: warning: exported method Application.IsFailing should have comment or be unexported (golint)
    • Line 165: warning: exported method Application.IsFailed should have comment or be unexported (golint)
    • Line 180: warning: exported method Application.HandleApplicationEventWithInfo should have comment or be unexported (golint)
    • Line 189: warning: exported method Application.OnStateChange should have comment or be unexported (golint)
    • Line 331: warning: comment on exported method Application.GetReservations should be of the form "GetReservations ..." (golint)
    • Line 344: warning: comment on exported method Application.GetAllocationAsk should be of the form "GetAllocationAsk ..." (golint)
    • Line 351: warning: comment on exported method Application.GetAllocatedResource should be of the form "GetAllocatedResource ..." (golint)
    • Line 358: warning: comment on exported method Application.GetPlaceholderResource should be of the form "GetPlaceholderResource ..." (golint)
    • Line 365: warning: comment on exported method Application.GetPlaceholderAsk should be of the form "GetPlaceholderAsk ..." (golint)
    • Line 373: warning: comment on exported method Application.GetPendingResource should be of the form "GetPendingResource ..." (golint)
    • Line 380: warning: comment on exported method Application.RemoveAllocationAsk should be of the form "RemoveAllocationAsk ..." (golint)
    • Line 462: warning: comment on exported method Application.AddAllocationAsk should be of the form "AddAllocationAsk ..." (golint)
    • Line 508: warning: comment on exported method Application.RecoverAllocationAsk should be of the form "RecoverAllocationAsk ..." (golint)
    • Line 558: warning: comment on exported method Application.IsReservedOnNode should be of the form "IsReservedOnNode ..." (golint)
    • Line 661: warning: comment on exported method Application.GetAskReservations should be of the form "GetAskReservations ..." (golint)
    • Line 1072: warning: exported method Application.GetQueueName should have comment or be unexported (golint)
    • Line 1078: warning: exported method Application.GetQueue should have comment or be unexported (golint)
    • Line 1084: warning: comment on exported method Application.SetQueueName should be of the form "SetQueueName ..." (golint)
    • Line 1092: warning: comment on exported method Application.SetQueue should be of the form "SetQueue ..." (golint)
    • Line 1100: warning: comment on exported method Application.UnSetQueue should be of the form "UnSetQueue ..." (golint)
    • Line 1110: warning: comment on exported method Application.GetAllAllocations should be of the form "GetAllAllocations ..." (golint)
    • Line 1145: warning: comment on exported method Application.AddAllocation should be of the form "AddAllocation ..." (golint)
    • Line 1191: warning: exported method Application.ReplaceAllocation should have comment or be unexported (golint)
    • Line 1221: warning: comment on exported method Application.RemoveAllocation should be of the form "RemoveAllocation ..." (golint)
    • Line 1272: warning: comment on exported method Application.RemoveAllAllocations should be of the form "RemoveAllAllocations ..." (golint)
    • Line 1297: warning: comment on exported method Application.GetUser should be of the form "GetUser ..." (golint)
    • Line 1305: warning: comment on exported method Application.GetTag should be of the form "GetTag ..." (golint)
    • Line 1321: warning: exported method Application.SetTerminatedCallback should have comment or be unexported (golint)
    • incubator-yunikorn-core/pkg/webservice/webservice.go
    • Line 40: warning: exported type WebService should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method WebService.StartWebApp should be of the form "StartWebApp ..." (golint)
    • Line 81: warning: exported function NewWebApp should have comment or be unexported (golint)
    • Line 88: warning: exported method WebService.StopWebApp should have comment or be unexported (golint)

gocyclo87%

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.

    • incubator-yunikorn-core/pkg/common/resources/resources_test.go
    • Line 415: warning: cyclomatic complexity 33 of function TestComponentWiseMax() is high (> 15) (gocyclo)
    • Line 309: warning: cyclomatic complexity 28 of function TestComponentWiseMin() is high (> 15) (gocyclo)
    • Line 1045: warning: cyclomatic complexity 18 of function TestGetShares() is high (> 15) (gocyclo)
    • Line 704: warning: cyclomatic complexity 17 of function TestWrapSafe() is high (> 15) (gocyclo)
    • Line 1116: warning: cyclomatic complexity 16 of function TestCompareShares() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


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!