Preparing report...

Report for github.com/openkruise/kruise

A+    Excellent!    Found 135 issues across 441 files

Tweet

gofmt99%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


golint75%

Golint is a linter for Go source code.

    • kruise/test/e2e/framework/containerrecreate_util.go
    • Line 30: warning: exported type ContainerRecreateTester should have comment or be unexported (golint)
    • Line 36: warning: exported function NewContainerRecreateTester should have comment or be unexported (golint)
    • Line 44: warning: exported method ContainerRecreateTester.CreateTestCloneSetAndGetPods should have comment or be unexported (golint)
    • Line 92: warning: exported method ContainerRecreateTester.CleanAllTestResources should have comment or be unexported (golint)
    • Line 102: warning: exported method ContainerRecreateTester.CreateCRR should have comment or be unexported (golint)
    • Line 106: warning: exported method ContainerRecreateTester.GetCRR should have comment or be unexported (golint)
    • Line 110: warning: exported method ContainerRecreateTester.GetPod should have comment or be unexported (golint)
    • kruise/test/e2e/framework/broadcastjob_util.go
    • Line 27: warning: exported type BroadcastJobTester should have comment or be unexported (golint)
    • Line 33: warning: exported function NewBroadcastJobTester should have comment or be unexported (golint)
    • Line 41: warning: exported method BroadcastJobTester.CreateBroadcastJob should have comment or be unexported (golint)
    • Line 45: warning: exported method BroadcastJobTester.GetBroadcastJob should have comment or be unexported (golint)
    • Line 49: warning: exported method BroadcastJobTester.GetPodsOfJob should have comment or be unexported (golint)
    • kruise/pkg/util/imagejob/imagejob_reader.go
    • Line 46: warning: exported function PopCachedNodeImagesForJob should have comment or be unexported (golint)
    • Line 66: warning: exported function GetNodeImagesForJob should have comment or be unexported (golint)
    • Line 163: warning: exported function GetActiveJobsForNodeImage should have comment or be unexported (golint)
    • Line 237: warning: exported function GetActiveJobsForPod should have comment or be unexported (golint)
    • Line 261: warning: exported function SortSpecImageTags should have comment or be unexported (golint)
    • Line 270: warning: exported function SortStatusImageTags should have comment or be unexported (golint)
    • kruise/apis/apps/pub/inplace_update.go
    • Line 34: warning: comment on exported const InPlaceUpdateStateKeyOld should be of the form "InPlaceUpdateStateKeyOld ..." (golint)
    • Line 40: warning: comment on exported const InPlaceUpdateGraceKeyOld should be of the form "InPlaceUpdateGraceKeyOld ..." (golint)
    • Line 70: warning: exported function GetInPlaceUpdateState should have comment or be unexported (golint)
    • Line 78: warning: exported function GetInPlaceUpdateGrace should have comment or be unexported (golint)
    • Line 86: warning: exported function RemoveInPlaceUpdateGrace should have comment or be unexported (golint)
    • kruise/pkg/controller/cloneset/utils/pod_sorter.go
    • Line 35: warning: exported type Ranker should have comment or be unexported (golint)
    • Line 176: warning: exported function NewSameNodeRanker should have comment or be unexported (golint)
    • Line 202: warning: exported type PodSpreadConstraint should have comment or be unexported (golint)
    • Line 211: warning: exported function NewSpreadConstraintsRanker should have comment or be unexported (golint)
    • kruise/pkg/util/lifecycle/lifecycle_utils.go
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • Line 47: warning: exported function NewForTypedClient should have comment or be unexported (golint)
    • Line 51: warning: exported function NewForInformer should have comment or be unexported (golint)
    • Line 55: warning: exported function NewForTest should have comment or be unexported (golint)
    • Line 59: warning: exported function GetPodLifecycleState should have comment or be unexported (golint)
    • Line 63: warning: exported function SetPodLifecycle should have comment or be unexported (golint)
    • Line 99: warning: exported function IsPodHooked should have comment or be unexported (golint)
    • Line 116: warning: exported function IsPodAllHooked should have comment or be unexported (golint)
    • kruise/pkg/util/podreadiness/pod_readiness_utils.go
    • Line 33: warning: exported function AddNotReadyKey should have comment or be unexported (golint)
    • Line 68: warning: exported function RemoveNotReadyKey should have comment or be unexported (golint)
    • Line 96: warning: exported type Message should have comment or be unexported (golint)
    • Line 148: warning: exported function GetReadinessCondition should have comment or be unexported (golint)
    • Line 161: warning: exported function ContainsReadinessGate should have comment or be unexported (golint)
    • kruise/pkg/util/pods.go
    • Line 74: warning: exported function MergeVolumeMounts should have comment or be unexported (golint)
    • Line 90: warning: exported function MergeEnvVar should have comment or be unexported (golint)
    • Line 107: warning: exported function MergeVolumes should have comment or be unexported (golint)
    • Line 124: warning: exported function GetContainerEnvVar should have comment or be unexported (golint)
    • Line 136: warning: exported function GetContainerEnvValue should have comment or be unexported (golint)
    • Line 148: warning: exported function GetContainerVolumeMount should have comment or be unexported (golint)
    • Line 160: warning: exported function GetContainer should have comment or be unexported (golint)
    • Line 180: warning: exported function GetContainerStatus should have comment or be unexported (golint)
    • Line 193: warning: exported function GetPodVolume should have comment or be unexported (golint)
    • Line 202: warning: exported function IsRunningAndReady should have comment or be unexported (golint)
    • Line 206: warning: exported function IsPodContainerDigestEqual should have comment or be unexported (golint)
    • Line 237: warning: exported function MergeVolumeMountsInContainer should have comment or be unexported (golint)
    • Line 253: warning: exported function IsPodOwnedByKruise should have comment or be unexported (golint)
    • Line 262: warning: exported function InjectReadinessGateToPod should have comment or be unexported (golint)
    • kruise/apis/apps/v1alpha1/sidecarset_types.go
    • Line 75: warning: exported type ShareVolumePolicy should have comment or be unexported (golint)
    • Line 79: warning: exported type PodInjectPolicyType should have comment or be unexported (golint)
    • Line 82: warning: exported const BeforeAppContainerType should have comment (or a comment on this block) or be unexported (golint)
    • Line 86: warning: exported type ShareVolumePolicyType should have comment or be unexported (golint)
    • Line 89: warning: exported const ShareVolumePolicyEnabled should have comment (or a comment on this block) or be unexported (golint)
    • Line 93: warning: exported type TransferEnvVar should have comment or be unexported (golint)
    • Line 98: warning: exported type SidecarContainerUpgradeType should have comment or be unexported (golint)
    • Line 101: warning: exported const SidecarContainerColdUpgrade should have comment (or a comment on this block) or be unexported (golint)
    • Line 105: warning: exported type SidecarContainerUpgradeStrategy should have comment or be unexported (golint)
    • Line 156: warning: exported type SidecarSetUpdateStrategyType should have comment or be unexported (golint)
    • Line 159: warning: exported const NotUpdateSidecarSetStrategyType should have comment (or a comment on this block) or be unexported (golint)
    • kruise/pkg/webhook/util/writer/fs.go
    • Line 33: warning: exported const FsCertWriter should have comment (or a comment on this block) or be unexported (golint)
    • Line 106: warning: exported function WriteCertsToDir should have comment or be unexported (golint)
    • kruise/pkg/daemon/util/account_manager.go
    • Line 27: warning: exported type AuthInfo should have comment or be unexported (golint)
    • Line 32: warning: exported method AuthInfo.EncodeToString should have comment or be unexported (golint)
    • Line 41: warning: exported type ImagePullAccountManager should have comment or be unexported (golint)
    • kruise/pkg/util/fieldindex/register.go
    • Line 32: warning: exported const IndexNameForPodNodeName should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported function RegisterFieldIndexes should have comment or be unexported (golint)
    • kruise/apis/apps/v1alpha1/daemonset_types.go
    • Line 36: warning: exported type DaemonSetUpdateStrategyType should have comment or be unexported (golint)
    • Line 37: warning: exported type RollingUpdateType should have comment or be unexported (golint)
    • Line 40: warning: comment on exported const RollingUpdateDaemonSetStrategyType should be of the form "RollingUpdateDaemonSetStrategyType ..." (golint)
    • Line 43: warning: comment on exported const OnDeleteDaemonSetStrategyType should be of the form "OnDeleteDaemonSetStrategyType ..." (golint)
    • Line 58: warning: comment on exported type RollingUpdateDaemonSet should be of the form "RollingUpdateDaemonSet ..." (with optional leading article) (golint)
    • Line 210: warning: exported type DaemonSetConditionType should have comment or be unexported (golint)
    • kruise/pkg/util/inplaceupdate/inplace_utils.go
    • Line 41: warning: exported type RefreshResult should have comment or be unexported (golint)
    • Line 46: warning: exported type UpdateResult should have comment or be unexported (golint)
    • Line 80: warning: exported function New should have comment or be unexported (golint)
    • Line 84: warning: exported function NewForTypedClient should have comment or be unexported (golint)
    • Line 88: warning: exported function NewForInformer should have comment or be unexported (golint)
    • Line 92: warning: exported function NewForTest should have comment or be unexported (golint)
    • kruise/test/e2e/framework/daemonset_util.go
    • Line 30: warning: exported const DaemonSetLabelPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported type DaemonSetTester should have comment or be unexported (golint)
    • Line 44: warning: exported function NewDaemonSetTester should have comment or be unexported (golint)
    • Line 52: warning: exported method DaemonSetTester.NewDaemonSet should have comment or be unexported (golint)
    • Line 82: warning: exported method DaemonSetTester.CreateDaemonSet should have comment or be unexported (golint)
    • Line 86: warning: exported method DaemonSetTester.GetDaemonSet should have comment or be unexported (golint)
    • Line 90: warning: exported method DaemonSetTester.UpdateDaemonSet should have comment or be unexported (golint)
    • Line 103: warning: exported method DaemonSetTester.DeleteDaemonSet should have comment or be unexported (golint)
    • Line 111: warning: exported method DaemonSetTester.PatchDaemonSet should have comment or be unexported (golint)
    • Line 115: warning: exported method DaemonSetTester.WaitForDaemonSetDeleted should have comment or be unexported (golint)
    • Line 132: warning: exported method DaemonSetTester.CheckDaemonStatus should have comment or be unexported (golint)
    • Line 144: warning: exported method DaemonSetTester.SeparateDaemonSetNodeLabels should have comment or be unexported (golint)
    • Line 157: warning: exported method DaemonSetTester.ClearDaemonSetNodeLabels should have comment or be unexported (golint)
    • Line 168: warning: exported method DaemonSetTester.SetDaemonSetNodeLabels should have comment or be unexported (golint)
    • Line 208: warning: exported method DaemonSetTester.CheckRunningOnAllNodes should have comment or be unexported (golint)
    • Line 215: warning: exported method DaemonSetTester.CheckRunningOnNoNodes should have comment or be unexported (golint)
    • Line 219: warning: exported method DaemonSetTester.SchedulableNodes should have comment or be unexported (golint)
    • Line 233: warning: exported method DaemonSetTester.CheckDaemonPodOnNodes should have comment or be unexported (golint)
    • Line 272: warning: exported method DaemonSetTester.WaitFailedDaemonPodDeleted should have comment or be unexported (golint)
    • Line 284: warning: exported method DaemonSetTester.CanScheduleOnNode should have comment or be unexported (golint)
    • Line 296: warning: exported method DaemonSetTester.ListDaemonPods should have comment or be unexported (golint)
    • kruise/pkg/control/sidecarcontrol/util_hotupgrade.go
    • Line 33: warning: comment on exported const SidecarSetWorkingHotUpgradeContainer should be of the form "SidecarSetWorkingHotUpgradeContainer ..." (golint)
    • Line 40: warning: comment on exported const SidecarSetVersionEnvKey should be of the form "SidecarSetVersionEnvKey ..." (golint)
    • Line 42: warning: comment on exported const SidecarSetVersionAltEnvKey should be of the form "SidecarSetVersionAltEnvKey ..." (golint)
    • Line 46: warning: comment on exported function GetHotUpgradeContainerName should be of the form "GetHotUpgradeContainerName ..." (golint)
    • Line 51: warning: comment on exported function GetPodSidecarSetVersionAnnotation should be of the form "GetPodSidecarSetVersionAnnotation ..." (golint)
    • Line 57: warning: exported function GetPodSidecarSetVersionAltAnnotation should have comment or be unexported (golint)
    • Line 61: warning: comment on exported function IsHotUpgradeContainer should be of the form "IsHotUpgradeContainer ..." (golint)
    • Line 66: warning: comment on exported function GetPodHotUpgradeInfoInAnnotations should be of the form "GetPodHotUpgradeInfoInAnnotations ..." (golint)
    • kruise/pkg/util/requeueduration/duration.go
    • Line 30: warning: exported method DurationStore.Push should have comment or be unexported (golint)
    • Line 40: warning: exported method DurationStore.Pop should have comment or be unexported (golint)
    • Line 60: warning: exported method Duration.Update should have comment or be unexported (golint)
    • Line 70: warning: exported method Duration.UpdateWithMsg should have comment or be unexported (golint)
    • Line 81: warning: exported method Duration.Merge should have comment or be unexported (golint)
    • Line 87: warning: exported method Duration.Get should have comment or be unexported (golint)
    • Line 93: warning: exported method Duration.GetWithMsg should have comment or be unexported (golint)
    • kruise/test/e2e/framework/cloneset_util.go
    • Line 28: warning: exported type CloneSetTester should have comment or be unexported (golint)
    • Line 34: warning: exported function NewCloneSetTester should have comment or be unexported (golint)
    • Line 42: warning: exported method CloneSetTester.NewCloneSet should have comment or be unexported (golint)
    • Line 72: warning: exported method CloneSetTester.CreateCloneSet should have comment or be unexported (golint)
    • Line 76: warning: exported method CloneSetTester.GetCloneSet should have comment or be unexported (golint)
    • Line 80: warning: exported method CloneSetTester.UpdateCloneSet should have comment or be unexported (golint)
    • Line 93: warning: exported method CloneSetTester.ListImagePullJobsForCloneSet should have comment or be unexported (golint)
    • Line 107: warning: exported method CloneSetTester.DeleteCloneSet should have comment or be unexported (golint)
    • kruise/test/e2e/framework/imagepulljob_util.go
    • Line 26: warning: exported type ImagePullJobTester should have comment or be unexported (golint)
    • Line 31: warning: exported function NewImagePullJobTester should have comment or be unexported (golint)
    • Line 38: warning: exported method ImagePullJobTester.CreateJob should have comment or be unexported (golint)
    • Line 43: warning: exported method ImagePullJobTester.DeleteJob should have comment or be unexported (golint)
    • Line 47: warning: exported method ImagePullJobTester.DeleteAllJobs should have comment or be unexported (golint)
    • Line 51: warning: exported method ImagePullJobTester.GetJob should have comment or be unexported (golint)
    • Line 55: warning: exported method ImagePullJobTester.ListJobs should have comment or be unexported (golint)
    • kruise/pkg/controller/advancedcronjob/advancedcronjob_controller.go
    • Line 43: warning: exported type IndexerFunc should have comment or be unexported (golint)
    • Line 106: warning: comment on exported type Clock should be of the form "Clock ..." (with optional leading article) (golint)
    • Line 129: warning: exported method ReconcileAdvancedCronJob.Reconcile should have comment or be unexported (golint)
    • Line 160: warning: exported method ReconcileAdvancedCronJob.SetupWithManager should have comment or be unexported (golint)
    • kruise/pkg/util/tools.go
    • Line 83: warning: exported function GetIntOrStrPointer should have comment or be unexported (golint)
    • Line 92: warning: exported function IsIntPlusAndMinus should have comment or be unexported (golint)
    • Line 96: warning: comment on exported function ParseImage should be of the form "ParseImage ..." (golint)
    • Line 119: warning: comment on exported function IsImageDigest should be of the form "IsImageDigest ..." (golint)
    • Line 126: warning: comment on exported function IsContainerImageEqual should be of the form "IsContainerImageEqual ..." (golint)
    • kruise/apis/apps/v1alpha1/containerrecreaterequest_types.go
    • Line 25: warning: comment on exported const ContainerRecreateRequestPodNameKey should be of the form "ContainerRecreateRequestPodNameKey ..." (golint)
    • Line 27: warning: comment on exported const ContainerRecreateRequestPodUIDKey should be of the form "ContainerRecreateRequestPodUIDKey ..." (golint)
    • Line 29: warning: comment on exported const ContainerRecreateRequestNodeNameKey should be of the form "ContainerRecreateRequestNodeNameKey ..." (golint)
    • Line 107: warning: exported type ContainerRecreateRequestFailurePolicyType should have comment or be unexported (golint)
    • Line 110: warning: exported const ContainerRecreateRequestFailurePolicyFail should have comment (or a comment on this block) or be unexported (golint)
    • Line 128: warning: exported type ContainerRecreateRequestPhase should have comment or be unexported (golint)
    • Line 131: warning: exported const ContainerRecreateRequestPending should have comment (or a comment on this block) or be unexported (golint)
    • kruise/pkg/controller/uniteddeployment/adapter/cloneset_adapter.go
    • Line 19: warning: exported type CloneSetAdapter should have comment or be unexported (golint)
    • Line 24: warning: exported method CloneSetAdapter.NewResourceObject should have comment or be unexported (golint)
    • Line 28: warning: exported method CloneSetAdapter.NewResourceListObject should have comment or be unexported (golint)
    • Line 32: warning: exported method CloneSetAdapter.GetObjectMeta should have comment or be unexported (golint)
    • Line 36: warning: exported method CloneSetAdapter.GetStatusObservedGeneration should have comment or be unexported (golint)
    • Line 40: warning: exported method CloneSetAdapter.GetReplicaDetails should have comment or be unexported (golint)
    • Line 66: warning: exported method CloneSetAdapter.GetSubsetFailure should have comment or be unexported (golint)
    • Line 70: warning: exported method CloneSetAdapter.ApplySubsetTemplate should have comment or be unexported (golint)
    • Line 141: warning: exported method CloneSetAdapter.PostUpdate should have comment or be unexported (golint)
    • Line 145: warning: exported method CloneSetAdapter.IsExpected should have comment or be unexported (golint)
    • kruise/pkg/control/pubcontrol/validate_pub.go
    • Line 41: warning: exported var ConflictRetry should have comment or be unexported (golint)
    • Line 48: warning: exported type Operation should have comment or be unexported (golint)
    • Line 51: warning: exported const UpdateOperation should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported function PodUnavailableBudgetValidatePod should have comment or be unexported (golint)
    • kruise/pkg/webhook/server.go
    • Line 35: warning: exported type GateFunc should have comment or be unexported (golint)
    • Line 42: warning: exported var Checker should have comment or be unexported (golint)
    • Line 83: warning: exported function SetupWithManager should have comment or be unexported (golint)
    • Line 110: warning: exported function Initialize should have comment or be unexported (golint)
    • Line 135: warning: exported function WaitReady should have comment or be unexported (golint)
    • kruise/pkg/control/sidecarcontrol/util.go
    • Line 59: warning: exported type SidecarSetUpgradeSpec should have comment or be unexported (golint)
    • Line 65: warning: comment on exported function PodMatchedSidecarSet should be of the form "PodMatchedSidecarSet ..." (golint)
    • Line 96: warning: exported function GetSidecarSetRevision should have comment or be unexported (golint)
    • Line 100: warning: exported function GetSidecarSetWithoutImageRevision should have comment or be unexported (golint)
    • Line 104: warning: exported function GetPodSidecarSetRevision should have comment or be unexported (golint)
    • Line 133: warning: exported function GetPodSidecarSetWithoutImageRevision should have comment or be unexported (golint)
    • Line 162: warning: comment on exported function IsPodSidecarUpdated should be of the form "IsPodSidecarUpdated ..." (golint)
    • Line 208: warning: exported function GetSidecarContainersInPod should have comment or be unexported (golint)
    • Line 222: warning: exported function GetPodsSortFunc should have comment or be unexported (golint)
    • Line 229: warning: exported function IsInjectedSidecarContainerInPod should have comment or be unexported (golint)
    • Line 236: warning: exported function IsSharePodVolumeMounts should have comment or be unexported (golint)
    • Line 240: warning: exported function GetInjectedVolumeMountsAndEnvs should have comment or be unexported (golint)
    • Line 280: warning: exported function GetSidecarTransferEnvs should have comment or be unexported (golint)
    • kruise/pkg/daemon/criruntime/factory.go
    • Line 45: warning: exported type ContainerRuntimeType should have comment or be unexported (golint)
    • Line 48: warning: exported const ContainerRuntimeDocker should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: exported function NewFactory should have comment or be unexported (golint)
    • kruise/test/e2e/framework/node_util.go
    • Line 33: warning: exported const E2eFakeKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type NodeTester should have comment or be unexported (golint)
    • Line 41: warning: exported function NewNodeTester should have comment or be unexported (golint)
    • Line 47: warning: exported method NodeTester.CreateFakeNode should have comment or be unexported (golint)
    • Line 135: warning: exported method NodeTester.DeleteFakeNode should have comment or be unexported (golint)
    • Line 144: warning: exported method NodeTester.ListRealNodesWithFake should have comment or be unexported (golint)
    • kruise/test/e2e/framework/sidecarset_utils.go
    • Line 38: warning: exported type SidecarSetTester should have comment or be unexported (golint)
    • Line 43: warning: exported function NewSidecarSetTester should have comment or be unexported (golint)
    • Line 50: warning: exported method SidecarSetTester.NewBaseSidecarSet should have comment or be unexported (golint)
    • Line 98: warning: exported method SidecarSetTester.NewBaseDeployment should have comment or be unexported (golint)
    • Line 135: warning: exported method SidecarSetTester.CreateSidecarSet should have comment or be unexported (golint)
    • Line 144: warning: exported method SidecarSetTester.UpdateSidecarSet should have comment or be unexported (golint)
    • Line 161: warning: exported method SidecarSetTester.UpdatePod should have comment or be unexported (golint)
    • Line 178: warning: exported method SidecarSetTester.WaitForSidecarSetUpgradeComplete should have comment or be unexported (golint)
    • Line 199: warning: exported method SidecarSetTester.CreateDeployment should have comment or be unexported (golint)
    • Line 206: warning: exported method SidecarSetTester.DeleteSidecarSets should have comment or be unexported (golint)
    • Line 218: warning: exported method SidecarSetTester.DeleteSidecarSet should have comment or be unexported (golint)
    • Line 226: warning: exported method SidecarSetTester.DeleteDeployments should have comment or be unexported (golint)
    • Line 238: warning: exported method SidecarSetTester.DeleteDeployment should have comment or be unexported (golint)
    • Line 247: warning: exported method SidecarSetTester.WaitForSidecarSetCreated should have comment or be unexported (golint)
    • Line 261: warning: exported method SidecarSetTester.WaitForDeploymentRunning should have comment or be unexported (golint)
    • Line 278: warning: exported method SidecarSetTester.WaitForDeploymentDeleted should have comment or be unexported (golint)
    • Line 295: warning: exported method SidecarSetTester.WaitForSidecarSetDeleted should have comment or be unexported (golint)
    • Line 312: warning: exported method SidecarSetTester.GetSelectorPods should have comment or be unexported (golint)
    • Line 324: warning: exported method SidecarSetTester.NewBaseCloneSet should have comment or be unexported (golint)
    • Line 372: warning: exported method SidecarSetTester.CreateCloneSet should have comment or be unexported (golint)
    • Line 372: warning: receiver name t should be consistent with previous receiver name s for SidecarSetTester (golint)
    • Line 382: warning: exported method SidecarSetTester.WaitForCloneSetRunning should have comment or be unexported (golint)
    • Line 382: warning: receiver name t should be consistent with previous receiver name s for SidecarSetTester (golint)
    • kruise/pkg/util/selector.go
    • Line 25: warning: comment on exported function IsSelectorOverlapping should be of the form "IsSelectorOverlapping ..." (golint)
    • Line 118: warning: exported function GetFastLabelSelector should have comment or be unexported (golint)
    • Line 128: warning: comment on exported function IsSelectorLooseOverlap should be of the form "IsSelectorLooseOverlap ..." (golint)
    • kruise/apis/apps/v1alpha1/advancedcronjob_types.go
    • Line 25: warning: exported const AdvancedCronJobKind should have comment or be unexported (golint)
    • Line 71: warning: exported type CronJobTemplate should have comment or be unexported (golint)
    • Line 81: warning: exported type TemplateKind should have comment or be unexported (golint)
    • Line 84: warning: exported const JobTemplate should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: comment on exported type BroadcastJobTemplateSpec should be of the form "BroadcastJobTemplateSpec ..." (with optional leading article) (golint)
    • kruise/pkg/util/controllerfinder/controller_finder.go
    • Line 44: warning: exported type ControllerReference should have comment or be unexported (golint)
    • Line 59: warning: exported type ControllerFinder should have comment or be unexported (golint)
    • Line 63: warning: exported function NewControllerFinder should have comment or be unexported (golint)
    • Line 69: warning: exported method ControllerFinder.GetScaleAndSelectorForRef should have comment or be unexported (golint)
    • Line 91: warning: exported method ControllerFinder.Finders should have comment or be unexported (golint)
    • kruise/pkg/util/podadapter/adapter.go
    • Line 30: warning: exported type Adapter should have comment or be unexported (golint)
    • Line 36: warning: exported type AdapterWithPatch should have comment or be unexported (golint)
    • Line 41: warning: exported type AdapterRuntimeClient should have comment or be unexported (golint)
    • Line 45: warning: exported method AdapterRuntimeClient.GetPod should have comment or be unexported (golint)
    • Line 51: warning: exported method AdapterRuntimeClient.UpdatePod should have comment or be unexported (golint)
    • Line 55: warning: exported method AdapterRuntimeClient.UpdatePodStatus should have comment or be unexported (golint)
    • Line 59: warning: exported method AdapterRuntimeClient.PatchPod should have comment or be unexported (golint)
    • Line 63: warning: exported type AdapterTypedClient should have comment or be unexported (golint)
    • Line 67: warning: exported method AdapterTypedClient.GetPod should have comment or be unexported (golint)
    • Line 71: warning: exported method AdapterTypedClient.UpdatePod should have comment or be unexported (golint)
    • Line 76: warning: exported method AdapterTypedClient.UpdatePodStatus should have comment or be unexported (golint)
    • Line 81: warning: exported method AdapterTypedClient.PatchPod should have comment or be unexported (golint)
    • Line 90: warning: exported type AdapterInformer should have comment or be unexported (golint)
    • Line 94: warning: exported method AdapterInformer.GetPod should have comment or be unexported (golint)
    • Line 102: warning: exported method AdapterInformer.UpdatePod should have comment or be unexported (golint)
    • Line 106: warning: exported method AdapterInformer.UpdatePodStatus should have comment or be unexported (golint)
    • kruise/apis/apps/pub/lifecycle.go
    • Line 20: warning: exported const LifecycleStateKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type LifecycleStateType should have comment or be unexported (golint)
    • Line 40: warning: exported type LifecycleHook should have comment or be unexported (golint)
    • kruise/pkg/webhook/util/util.go
    • Line 26: warning: exported function GetHost should have comment or be unexported (golint)
    • Line 30: warning: exported function GetNamespace should have comment or be unexported (golint)
    • Line 37: warning: exported function GetSecretName should have comment or be unexported (golint)
    • Line 44: warning: exported function GetServiceName should have comment or be unexported (golint)
    • Line 51: warning: exported function GetPort should have comment or be unexported (golint)
    • Line 63: warning: exported function GetCertDir should have comment or be unexported (golint)
    • Line 70: warning: exported function GetCertWriter should have comment or be unexported (golint)
    • kruise/test/e2e/framework/nodeimage_util.go
    • Line 34: warning: comment on exported const FakeNodeImageLabelKey should be of the form "FakeNodeImageLabelKey ..." (golint)
    • Line 38: warning: exported type NodeImageTester should have comment or be unexported (golint)
    • Line 43: warning: exported function NewNodeImageTester should have comment or be unexported (golint)
    • Line 50: warning: exported method NodeImageTester.CreateFakeNodeImageIfNotPresent should have comment or be unexported (golint)
    • Line 65: warning: exported method NodeImageTester.DeleteFakeNodeImage should have comment or be unexported (golint)
    • Line 73: warning: exported method NodeImageTester.ListNodeImages should have comment or be unexported (golint)
    • Line 77: warning: exported method NodeImageTester.ExpectNodes should have comment or be unexported (golint)
    • Line 100: warning: exported method NodeImageTester.GetNodeImage should have comment or be unexported (golint)
    • Line 104: warning: exported method NodeImageTester.IsImageInSpec should have comment or be unexported (golint)
    • kruise/pkg/daemon/criruntime/imageruntime/interface.go
    • Line 25: warning: exported type ImageInfo should have comment or be unexported (golint)
    • Line 36: warning: exported type ImagePullStatus should have comment or be unexported (golint)
    • Line 43: warning: exported type ImagePullStatusReader should have comment or be unexported (golint)
    • Line 48: warning: exported type ImageService should have comment or be unexported (golint)
    • kruise/pkg/webhook/util/convertor/util.go
    • Line 29: warning: exported function ConvertPodTemplateSpec should have comment or be unexported (golint)
    • Line 37: warning: exported function ConvertCoreVolumes should have comment or be unexported (golint)
    • Line 49: warning: exported function GetPercentValue should have comment or be unexported (golint)
    • Line 60: warning: exported function GetIntOrPercentValue should have comment or be unexported (golint)
    • kruise/apis/apps/v1alpha1/defaults.go
    • Line 29: warning: comment on exported function SetDefaultsSidecarSet should be of the form "SetDefaultsSidecarSet ..." (golint)
    • Line 116: warning: comment on exported function SetDefaultsAdvancedCronJob should be of the form "SetDefaultsAdvancedCronJob ..." (golint)
    • Line 143: warning: comment on exported function SetDefaultsBroadcastJob should be of the form "SetDefaultsBroadcastJob ..." (golint)
    • Line 161: warning: comment on exported function SetDefaultsStatefulSet should be of the form "SetDefaultsStatefulSet ..." (golint)
    • Line 210: warning: comment on exported function SetDefaultsUnitedDeployment should be of the form "SetDefaultsUnitedDeployment ..." (golint)
    • Line 239: warning: comment on exported function SetDefaultsCloneSet should be of the form "SetDefaultsCloneSet ..." (golint)
    • Line 280: warning: comment on exported function SetDefaultsDaemonSet should be of the form "SetDefaultsDaemonSet ..." (golint)
    • Line 543: warning: comment on exported function SetDefaultsNodeImage should be of the form "SetDefaultsNodeImage ..." (golint)
    • Line 561: warning: exported function SetDefaultsImageTagPullPolicy should have comment or be unexported (golint)
    • Line 570: warning: comment on exported function SetDefaultsImagePullJob should be of the form "SetDefaultsImagePullJob ..." (golint)

gocyclo90%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • kruise/pkg/controller/imagepulljob/imagepulljob_controller.go
    • Line 233: warning: cyclomatic complexity 24 of function (*ReconcileImagePullJob).syncNodeImages() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 24 of function (*ReconcileImagePullJob).calculateStatus() is high (> 15) (gocyclo)
    • Line 127: warning: cyclomatic complexity 23 of function (*ReconcileImagePullJob).Reconcile() is high (> 15) (gocyclo)
    • kruise/pkg/controller/nodeimage/nodeimage_controller.go
    • Line 356: warning: cyclomatic complexity 30 of function (*ReconcileNodeImage).updateNodeImageStatus() is high (> 15) (gocyclo)
    • Line 258: warning: cyclomatic complexity 24 of function (*ReconcileNodeImage).doUpdateNodeImage() is high (> 15) (gocyclo)
    • Line 144: warning: cyclomatic complexity 21 of function (*ReconcileNodeImage).Reconcile() is high (> 15) (gocyclo)
    • kruise/pkg/controller/daemonset/daemonset_controller.go
    • Line 653: warning: cyclomatic complexity 18 of function (*ReconcileDaemonSet).syncNodes() is high (> 15) (gocyclo)
    • Line 328: warning: cyclomatic complexity 18 of function (*ReconcileDaemonSet).syncDaemonSet() is high (> 15) (gocyclo)
    • Line 585: warning: cyclomatic complexity 17 of function (*ReconcileDaemonSet).manage() is high (> 15) (gocyclo)
    • Line 792: warning: cyclomatic complexity 17 of function (*ReconcileDaemonSet).podsShouldBeOnNode() is high (> 15) (gocyclo)
    • Line 515: warning: cyclomatic complexity 16 of function (*ReconcileDaemonSet).updateDaemonSetStatus() is high (> 15) (gocyclo)
    • kruise/pkg/controller/daemonset/update.go
    • Line 658: warning: cyclomatic complexity 32 of function (*ReconcileDaemonSet).surgingRollingUpdate() is high (> 15) (gocyclo)
    • Line 465: warning: cyclomatic complexity 20 of function (*ReconcileDaemonSet).filterDaemonPodsNodeToUpdate() is high (> 15) (gocyclo)
    • kruise/pkg/controller/statefulset/stateful_set_control_test.go
    • Line 839: warning: cyclomatic complexity 46 of function TestStatefulSetControlOnDeleteUpdate() is high (> 15) (gocyclo)
    • Line 2313: warning: cyclomatic complexity 40 of function TestStatefulSetControlRollback() is high (> 15) (gocyclo)
    • Line 1946: warning: cyclomatic complexity 36 of function TestStatefulSetControlInPlaceUpdate() is high (> 15) (gocyclo)
    • Line 1677: warning: cyclomatic complexity 29 of function TestStatefulSetControlRollingUpdateWithPartition() is high (> 15) (gocyclo)
    • Line 1106: warning: cyclomatic complexity 27 of function TestStatefulSetControlRollingUpdateWithPaused() is high (> 15) (gocyclo)
    • Line 1303: warning: cyclomatic complexity 25 of function TestScaleUpStatefulSetWithMinReadySeconds() is high (> 15) (gocyclo)
    • Line 2102: warning: cyclomatic complexity 24 of function TestStatefulSetControlLifecycleHook() is high (> 15) (gocyclo)
    • Line 3095: warning: cyclomatic complexity 22 of function updateStatefulSetControl() is high (> 15) (gocyclo)
    • Line 1492: warning: cyclomatic complexity 22 of function TestUpdateStatefulSetWithMinReadySeconds() is high (> 15) (gocyclo)
    • Line 533: warning: cyclomatic complexity 21 of function TestStatefulSetControl_getSetRevisions() is high (> 15) (gocyclo)
    • Line 665: warning: cyclomatic complexity 21 of function TestStatefulSetControlRollingUpdate() is high (> 15) (gocyclo)
    • Line 1834: warning: cyclomatic complexity 20 of function TestStatefulSetControlRollingUpdateWithMaxUnavailable() is high (> 15) (gocyclo)
    • Line 220: warning: cyclomatic complexity 18 of function ReplacesPods() is high (> 15) (gocyclo)
    • Line 2940: warning: cyclomatic complexity 17 of function scaleUpStatefulSetControl() is high (> 15) (gocyclo)
    • Line 2880: warning: cyclomatic complexity 16 of function assertUpdateInvariants() is high (> 15) (gocyclo)
    • kruise/pkg/util/selector.go
    • Line 37: warning: cyclomatic complexity 22 of function isDisjoint() is high (> 15) (gocyclo)
    • Line 175: warning: cyclomatic complexity 20 of function isMatchExpOverlap() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!