Preparing report...

Report for github.com/gocrane/crane

(v0.0.0-20220104024548-1e856f046447)

A+    Excellent!    Found 73 issues across 107 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!


gocyclo95%

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.


golint32%

Golint is a linter for Go source code.

    • pkg/recommend/advisors.go
    • Line 19: warning: exported type MinMaxReplicasAdvisor should have comment or be unexported (golint)
    • Line 23: warning: exported type ResourceRequestAdvisor should have comment or be unexported (golint)
    • Line 27: warning: exported method ResourceRequestAdvisor.Init should have comment or be unexported (golint)
    • Line 90: warning: exported method ResourceRequestAdvisor.Advise should have comment or be unexported (golint)
    • Line 135: warning: exported method MinMaxReplicasAdvisor.Advise should have comment or be unexported (golint)
    • Line 139: warning: exported type PredictionAdvisor should have comment or be unexported (golint)
    • Line 143: warning: exported method PredictionAdvisor.Advise should have comment or be unexported (golint)
    • Line 147: warning: exported function NewAdvisors should have comment or be unexported (golint)
    • pkg/ensurance/executor/interface.go
    • Line 8: warning: exported type Executor should have comment or be unexported (golint)
    • Line 13: warning: exported type AvoidanceExecutor should have comment or be unexported (golint)
    • Line 19: warning: exported type ExecuteContext should have comment or be unexported (golint)
    • pkg/known/reason.go
    • Line 4: warning: exported const ReasonTimeSeriesPredictFailed should have comment (or a comment on this block) or be unexported (golint)
    • pkg/recommend/recommender.go
    • Line 24: warning: exported function NewRecommender should have comment or be unexported (golint)
    • Line 38: warning: exported method Recommender.Offer should have comment or be unexported (golint)
    • Line 74: warning: exported function GetContext should have comment or be unexported (golint)
    • pkg/controller/cnp/cnp_controller.go
    • Line 19: warning: exported type ClusterNodePredictionController should have comment or be unexported (golint)
    • Line 27: warning: exported method ClusterNodePredictionController.Reconcile should have comment or be unexported (golint)
    • pkg/ensurance/cache/nep.go
    • Line 9: warning: exported type CachedNodeQOSEnsurancePolicy should have comment or be unexported (golint)
    • Line 14: warning: exported type NodeQOSEnsurancePolicyCache should have comment or be unexported (golint)
    • Line 19: warning: exported method NodeQOSEnsurancePolicyCache.Init should have comment or be unexported (golint)
    • Line 35: warning: exported method NodeQOSEnsurancePolicyCache.Get should have comment or be unexported (golint)
    • Line 42: warning: exported method NodeQOSEnsurancePolicyCache.Exist should have comment or be unexported (golint)
    • Line 49: warning: exported method NodeQOSEnsurancePolicyCache.GetOrCreate should have comment or be unexported (golint)
    • Line 59: warning: exported method NodeQOSEnsurancePolicyCache.Set should have comment or be unexported (golint)
    • Line 65: warning: exported method NodeQOSEnsurancePolicyCache.Delete should have comment or be unexported (golint)
    • pkg/ensurance/grpc/connection.go
    • Line 17: warning: exported function InitGrpcConnection should have comment or be unexported (golint)
    • Line 51: warning: exported function CloseGrpcConnection should have comment or be unexported (golint)
    • pkg/prediction/dsp/prediction.go
    • Line 16: warning: exported var Hour should have comment or be unexported (golint)
    • Line 32: warning: exported function NewPrediction should have comment or be unexported (golint)
    • Line 128: warning: exported function SamplesToSignal should have comment or be unexported (golint)
    • pkg/common/types.go
    • Line 36: warning: exported method TimeSeries.SetLabels should have comment or be unexported (golint)
    • Line 40: warning: exported method TimeSeries.SetSamples should have comment or be unexported (golint)
    • Line 44: warning: exported method TimeSeries.AppendLabel should have comment or be unexported (golint)
    • Line 48: warning: exported method TimeSeries.AppendSample should have comment or be unexported (golint)
    • Line 52: warning: exported function NewTimeSeries should have comment or be unexported (golint)
    • Line 67: warning: exported type Operator should have comment or be unexported (golint)
    • Line 70: warning: exported const OperatorEqual should have comment (or a comment on this block) or be unexported (golint)
    • Line 77: warning: exported type Options should have comment or be unexported (golint)
    • Line 79: warning: exported function Labels2Maps should have comment or be unexported (golint)
    • pkg/ensurance/executor/throttle.go
    • Line 5: warning: exported type ThrottleExecutor should have comment or be unexported (golint)
    • Line 11: warning: exported type CPUThrottle should have comment or be unexported (golint)
    • Line 16: warning: exported type CPURatio should have comment or be unexported (golint)
    • Line 24: warning: exported type MemoryThrottle should have comment or be unexported (golint)
    • Line 29: warning: exported method ThrottleExecutor.Avoid should have comment or be unexported (golint)
    • Line 33: warning: exported method ThrottleExecutor.Restore should have comment or be unexported (golint)
    • pkg/utils/ref.go
    • Line 8: warning: exported function GetNodeRef should have comment or be unexported (golint)
    • pkg/controller/ehpa/effective_hpa_controller.go
    • Line 38: warning: exported method EffectiveHPAController.Reconcile should have comment or be unexported (golint)
    • Line 120: warning: exported method EffectiveHPAController.UpdateStatus should have comment or be unexported (golint)
    • Line 136: warning: exported method EffectiveHPAController.SetupWithManager should have comment or be unexported (golint)
    • Line 177: warning: exported function RecordMetrics should have comment or be unexported (golint)
    • pkg/controller/tsp/tsp_controller.go
    • Line 21: warning: exported type Controller should have comment or be unexported (golint)
    • Line 35: warning: exported function NewController should have comment or be unexported (golint)
    • Line 51: warning: comment on exported method Controller.Reconcile should be of the form "Reconcile ..." (golint)
    • Line 113: warning: exported function NewMetricContext should have comment or be unexported (golint)
    • Line 131: warning: exported function ExistsPredictionMetric should have comment or be unexported (golint)
    • Line 140: warning: exported function GetTimeSeriesPredictionKey should have comment or be unexported (golint)
    • pkg/known/const.go
    • Line 4: warning: exported const CraneSystemNamespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: exported const MetricNamePodCpuUsage should have comment (or a comment on this block) or be unexported (golint)
    • pkg/ensurance/statestore/nodelocal/nodelocal.go
    • Line 27: warning: exported type NodeLocal should have comment or be unexported (golint)
    • Line 32: warning: exported function NewNodeLocal should have comment or be unexported (golint)
    • Line 52: warning: exported method NodeLocal.GetType should have comment or be unexported (golint)
    • Line 56: warning: exported method NodeLocal.Collect should have comment or be unexported (golint)
    • Line 77: warning: exported function CheckMetricNameExist should have comment or be unexported (golint)
    • pkg/metrics/tsp_metric_collector.go
    • Line 19: warning: exported type TspMetricCollector should have comment or be unexported (golint)
    • Line 26: warning: exported function NewTspMetricCollector should have comment or be unexported (golint)
    • Line 44: warning: comment on exported method TspMetricCollector.Describe should be of the form "Describe ..." (golint)
    • Line 52: warning: exported method TspMetricCollector.Collect should have comment or be unexported (golint)
    • Line 144: warning: exported function AggregateSignalKey should have comment or be unexported (golint)
    • pkg/controller/ehpa/hpa.go
    • Line 23: warning: exported method EffectiveHPAController.ReconcileHPA should have comment or be unexported (golint)
    • Line 32: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 44: warning: exported method EffectiveHPAController.GetHPA should have comment or be unexported (golint)
    • Line 59: warning: exported method EffectiveHPAController.CreateHPA should have comment or be unexported (golint)
    • Line 80: warning: exported method EffectiveHPAController.NewHPAObject should have comment or be unexported (golint)
    • Line 132: warning: exported method EffectiveHPAController.UpdateHPAIfNeed should have comment or be unexported (golint)
    • pkg/ensurance/cache/detection.go
    • Line 13: warning: exported type DetectionCondition should have comment or be unexported (golint)
    • Line 33: warning: exported type DetectionConditionCache should have comment or be unexported (golint)
    • Line 38: warning: exported method DetectionConditionCache.GetOrCreate should have comment or be unexported (golint)
    • Line 51: warning: exported method DetectionConditionCache.Get should have comment or be unexported (golint)
    • Line 58: warning: exported method DetectionConditionCache.Set should have comment or be unexported (golint)
    • Line 68: warning: exported method DetectionConditionCache.Exist should have comment or be unexported (golint)
    • Line 75: warning: exported method DetectionConditionCache.ListDetections should have comment or be unexported (golint)
    • Line 87: warning: exported function GenerateDetectionKey should have comment or be unexported (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 95: warning: exported type DetectionStatus should have comment or be unexported (golint)
    • pkg/agent/agent.go
    • Line 37: warning: exported const DefaultWorkers should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported type Agent should have comment or be unexported (golint)
    • Line 54: warning: exported function NewAgent should have comment or be unexported (golint)
    • Line 137: warning: exported method Agent.Run should have comment or be unexported (golint)
    • pkg/prediction/generic.go
    • Line 15: warning: exported const HistoryProvider should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type WithMetricEvent should have comment or be unexported (golint)
    • Line 24: warning: exported type GenericPrediction should have comment or be unexported (golint)
    • Line 33: warning: exported function NewGenericPrediction should have comment or be unexported (golint)
    • Line 42: warning: exported method GenericPrediction.GetHistoryProvider should have comment or be unexported (golint)
    • Line 46: warning: exported method GenericPrediction.GetRealtimeProvider should have comment or be unexported (golint)
    • Line 50: warning: exported method GenericPrediction.WithProviders should have comment or be unexported (golint)
    • Line 60: warning: exported method GenericPrediction.WithQuery should have comment or be unexported (golint)
    • Line 76: warning: exported function AggregateSignalKey should have comment or be unexported (golint)
    • pkg/utils/string.go
    • Line 5: warning: exported function ContainsString should have comment or be unexported (golint)
    • Line 14: warning: exported function ParseFloat should have comment or be unexported (golint)
    • pkg/log/log.go
    • Line 18: warning: exported function Logger should have comment or be unexported (golint)
    • Line 25: warning: exported function Init should have comment or be unexported (golint)
    • Line 32: warning: exported function NewLogger should have comment or be unexported (golint)
    • Line 36: warning: exported function GenerateKey should have comment or be unexported (golint)
    • Line 40: warning: exported function GenerateObj should have comment or be unexported (golint)
    • pkg/ensurance/statestore/nodelocal/cpu.go
    • Line 17: warning: exported const MAX_PERCENTAGE should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported type CpuTimeStampState should have comment or be unexported (golint)
    • Line 30: warning: exported type CpuCollector should have comment or be unexported (golint)
    • Line 41: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • pkg/recommend/inspectors.go
    • Line 13: warning: exported type ResourceRequestInspector should have comment or be unexported (golint)
    • Line 17: warning: exported method ResourceRequestInspector.Inspect should have comment or be unexported (golint)
    • Line 30: warning: exported type WorkloadInspector should have comment or be unexported (golint)
    • Line 34: warning: exported method WorkloadInspector.Inspect should have comment or be unexported (golint)
    • Line 50: warning: exported type WorkloadPodsInspector should have comment or be unexported (golint)
    • Line 55: warning: exported method WorkloadPodsInspector.Inspect should have comment or be unexported (golint)
    • Line 75: warning: exported function NewInspectors should have comment or be unexported (golint)
    • pkg/controller/ehpa/substitute.go
    • Line 21: warning: exported method EffectiveHPAController.ReconcileSubstitute should have comment or be unexported (golint)
    • Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 42: warning: exported method EffectiveHPAController.CreateSubstitute should have comment or be unexported (golint)
    • Line 63: warning: exported method EffectiveHPAController.NewSubstituteObject should have comment or be unexported (golint)
    • Line 90: warning: exported method EffectiveHPAController.UpdateSubstituteIfNeed should have comment or be unexported (golint)
    • pkg/ensurance/runtime/container.go
    • Line 14: warning: comment on exported type UpdateOptions should be of the form "UpdateOptions ..." (with optional leading article) (golint)
    • Line 36: warning: comment on exported type ListOptions should be of the form "ListOptions ..." (with optional leading article) (golint)
    • pkg/prediction/dsp/estimators.go
    • Line 22: warning: exported type Estimator should have comment or be unexported (golint)
    • Line 27: warning: exported function NewMaxValueEstimator should have comment or be unexported (golint)
    • Line 31: warning: exported function NewFFTEstimator should have comment or be unexported (golint)
    • pkg/ensurance/logic/opa.go
    • Line 3: warning: exported type OpaLogic should have comment or be unexported (golint)
    • Line 6: warning: exported function NewOpaLogic should have comment or be unexported (golint)
    • Line 10: warning: exported method OpaLogic.EvalWithMetric should have comment or be unexported (golint)
    • Line 21: warning: exported method OpaLogic.EvalWithRaw should have comment or be unexported (golint)
    • pkg/ensurance/statestore/types/types.go
    • Line 3: warning: exported type CollectType should have comment or be unexported (golint)
    • Line 5: warning: exported type MetricName should have comment or be unexported (golint)
    • Line 8: warning: exported const MetricNamCpuTotalUsage should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported const NodeLocalCollectorType should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type MetricNameConfig should have comment or be unexported (golint)
    • Line 21: warning: exported type MetricNameConfigs should have comment or be unexported (golint)
    • Line 23: warning: exported type UpdateEvent should have comment or be unexported (golint)
    • pkg/utils/util.go
    • Line 3: warning: exported function GetUint64withDefault should have comment or be unexported (golint)
    • Line 11: warning: exported function GetInt64withDefault should have comment or be unexported (golint)
    • Line 19: warning: exported function GetUint32withDefault should have comment or be unexported (golint)
    • Line 27: warning: exported function GetInt32withDefault should have comment or be unexported (golint)
    • Line 35: warning: exported function GetUint64FromMaps should have comment or be unexported (golint)
    • pkg/ensurance/client/node.go
    • Line 27: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 85: warning: exported function FilterNodeConditionByType should have comment or be unexported (golint)
    • pkg/ensurance/executor/schedule.go
    • Line 12: warning: exported const DefaultCoolDownSeconds should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type ScheduledExecutor should have comment or be unexported (golint)
    • Line 20: warning: exported type ScheduledQOSPriority should have comment or be unexported (golint)
    • Line 25: warning: exported method ScheduledExecutor.Avoid should have comment or be unexported (golint)
    • Line 54: warning: exported method ScheduledExecutor.Restore should have comment or be unexported (golint)
    • Line 83: warning: exported method ScheduledQOSPriority.Less should have comment or be unexported (golint)
    • Line 95: warning: exported method ScheduledQOSPriority.Greater should have comment or be unexported (golint)
    • Line 117: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 139: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pkg/utils/scale.go
    • Line 19: warning: exported function GetScale should have comment or be unexported (golint)
    • Line 45: warning: exported function GetPodsFromScale should have comment or be unexported (golint)
    • pkg/version/version.go
    • Line 17: warning: exported type Version should have comment or be unexported (golint)
    • Line 27: warning: exported function GetVersionInfo should have comment or be unexported (golint)
    • pkg/controller/ehpa/predict.go
    • Line 22: warning: exported method EffectiveHPAController.ReconcilePredication should have comment or be unexported (golint)
    • Line 31: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 43: warning: exported method EffectiveHPAController.GetPredication should have comment or be unexported (golint)
    • Line 58: warning: exported method EffectiveHPAController.CreatePrediction should have comment or be unexported (golint)
    • Line 79: warning: exported method EffectiveHPAController.UpdatePredictionIfNeed should have comment or be unexported (golint)
    • Line 104: warning: exported method EffectiveHPAController.NewPredictionObject should have comment or be unexported (golint)
    • Line 159: warning: exported function IsPredictionEnabled should have comment or be unexported (golint)
    • pkg/controller/tsp/status.go
    • Line 162: warning: exported method Controller.UpdateStatus should have comment or be unexported (golint)
    • Line 177: warning: exported function CommonTimeSeries2ApiTimeSeries should have comment or be unexported (golint)
    • Line 215: warning: exported function IsWindowInSamples should have comment or be unexported (golint)
    • Line 223: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pkg/ensurance/executor/evict.go
    • Line 15: warning: exported const DefaultDeletionGracePeriodSeconds should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type EvictExecutor should have comment or be unexported (golint)
    • Line 22: warning: exported type EvictPod should have comment or be unexported (golint)
    • Line 28: warning: exported type EvictPods should have comment or be unexported (golint)
    • Line 36: warning: exported method EvictPods.Find should have comment or be unexported (golint)
    • Line 46: warning: exported method EvictExecutor.Avoid should have comment or be unexported (golint)
    • Line 88: warning: exported method EvictExecutor.Restore should have comment or be unexported (golint)
    • pkg/ensurance/statestore/metricsserver/metricsserver.go
    • Line 9: warning: exported type MetricsServer should have comment or be unexported (golint)
    • Line 14: warning: exported function NewMetricsServer should have comment or be unexported (golint)
    • Line 22: warning: exported method MetricsServer.GetName should have comment or be unexported (golint)
    • Line 26: warning: exported method MetricsServer.Collect should have comment or be unexported (golint)
    • pkg/recommend/types.go
    • Line 15: warning: exported type RecommendationPolicy should have comment or be unexported (golint)
    • Line 23: warning: exported type RecommendationPolicySpec should have comment or be unexported (golint)
    • Line 27: warning: exported type InspectorPolicy should have comment or be unexported (golint)
    • pkg/prediction/config/broadcast.go
    • Line 8: warning: exported type Broadcaster should have comment or be unexported (golint)
    • Line 13: warning: exported type Receiver should have comment or be unexported (golint)
    • Line 17: warning: exported function NewBroadcaster should have comment or be unexported (golint)
    • pkg/ensurance/logic/basic.go
    • Line 3: warning: exported type BasicLogic should have comment or be unexported (golint)
    • Line 6: warning: exported function NewBasicLogic should have comment or be unexported (golint)
    • Line 10: warning: exported method BasicLogic.EvalWithMetric should have comment or be unexported (golint)
    • Line 14: warning: exported method BasicLogic.EvalWithRaw should have comment or be unexported (golint)
    • pkg/prediction/config/config.go
    • Line 21: warning: comment on exported const NodeCpuUsagePromQLFmtStr should be of the form "NodeCpuUsagePromQLFmtStr ..." (golint)
    • Line 28: warning: exported var UpdateEventBroadcaster should have comment or be unexported (golint)
    • Line 29: warning: exported var DeleteEventBroadcaster should have comment or be unexported (golint)
    • Line 33: warning: exported method MetricContext.WithApiConfig should have comment or be unexported (golint)
    • Line 47: warning: exported const TargetKindNode should have comment or be unexported (golint)
    • Line 49: warning: exported type MetricContext should have comment or be unexported (golint)
    • Line 55: warning: exported method MetricContext.WithApiConfigs should have comment or be unexported (golint)
    • Line 61: warning: exported method MetricContext.DeleteApiConfig should have comment or be unexported (golint)
    • Line 70: warning: exported method MetricContext.DeleteApiConfigs should have comment or be unexported (golint)
    • Line 76: warning: exported method MetricContext.WithConfigs should have comment or be unexported (golint)
    • Line 82: warning: exported method MetricContext.WithConfig should have comment or be unexported (golint)
    • Line 91: warning: exported method MetricContext.DeleteConfig should have comment or be unexported (golint)
    • Line 114: warning: exported method MetricContext.ResourceToPromQueryExpr should have comment or be unexported (golint)
    • pkg/prediction/percentile/extimator.go
    • Line 7: warning: exported type Estimator should have comment or be unexported (golint)
    • Line 20: warning: exported function NewPercentileEstimator should have comment or be unexported (golint)
    • Line 24: warning: exported function WithMargin should have comment or be unexported (golint)
    • pkg/ensurance/analyzer/analyzer.go
    • Line 30: warning: exported type AnalyzerManager should have comment or be unexported (golint)
    • Line 84: warning: exported method AnalyzerManager.Name should have comment or be unexported (golint)
    • Line 88: warning: exported method AnalyzerManager.Run should have comment or be unexported (golint)
    • Line 119: warning: exported method AnalyzerManager.Analyze should have comment or be unexported (golint)
    • pkg/controller/noderesource/node_resource_controller.go
    • Line 39: warning: exported const ExtResourcePrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported method NodeResourceReconciler.Reconcile should have comment or be unexported (golint)
    • Line 76: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 96: warning: error should be the last type when returning multiple items (golint)
    • Line 96: warning: exported method NodeResourceReconciler.FindTargetNode should have comment or be unexported (golint)
    • Line 118: warning: exported method NodeResourceReconciler.BuildNodeStatus should have comment or be unexported (golint)
    • pkg/known/label.go
    • Line 4: warning: exported const EffectiveHorizontalPodAutoscalerUidLabel should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: exported const EnsuranceAnalyzedPressureTaintKey should have comment (or a comment on this block) or be unexported (golint)
    • pkg/metrics/metrics.go
    • Line 9: warning: exported var HPAReplicas should have comment or be unexported (golint)
    • Line 34: warning: exported function CustomCollectorRegister should have comment or be unexported (golint)
    • pkg/recommend/interface.go
    • Line 3: warning: exported type Inspector should have comment or be unexported (golint)
    • Line 8: warning: exported type Advisor should have comment or be unexported (golint)
    • pkg/prediction/config/types.go
    • Line 9: warning: exported type AlgorithmModelConfig should have comment or be unexported (golint)
    • Line 13: warning: exported type Config should have comment or be unexported (golint)
    • Line 20: warning: comment on exported method MetricContext.ConvertApiMetrics2InternalConfigs should be of the form "ConvertApiMetrics2InternalConfigs ..." (golint)
    • Line 29: warning: comment on exported method MetricContext.ConvertApiMetric2InternalConfig should be of the form "ConvertApiMetric2InternalConfig ..." (golint)
    • Line 42: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pkg/metricprovider/provider.go
    • Line 50: warning: exported method MetricProvider.GetMetricByName should have comment or be unexported (golint)
    • Line 170: warning: exported method MetricProvider.GetPrediction should have comment or be unexported (golint)
    • Line 198: warning: exported method MetricProvider.GetPods should have comment or be unexported (golint)
    • pkg/controller/analytics/analytics_controller.go
    • Line 35: warning: exported type Controller should have comment or be unexported (golint)
    • Line 48: warning: exported method Controller.Reconcile should have comment or be unexported (golint)
    • Line 247: warning: receiver name ac should be consistent with previous receiver name c for Controller (golint)
    • Line 310: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 336: warning: exported method Controller.SetupWithManager should have comment or be unexported (golint)
    • Line 363: warning: exported type ObjectIdentity should have comment or be unexported (golint)
    • pkg/webhooks/webhook.go
    • Line 30: warning: exported function SetupWebhookWithManager should have comment or be unexported (golint)
    • Line 43: warning: exported type PredictionAdmission should have comment or be unexported (golint)
    • pkg/providers/prom/prom.go
    • Line 22: warning: exported const PrometheusClientID should have comment (or a comment on this block) or be unexported (golint)
    • Line 99: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 118: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • pkg/ensurance/statestore/ebpf/ebpf.go
    • Line 9: warning: exported type EBPF should have comment or be unexported (golint)
    • Line 14: warning: exported method EBPF.GetName should have comment or be unexported (golint)
    • Line 18: warning: exported function NewEBPF should have comment or be unexported (golint)
    • Line 26: warning: exported method EBPF.Collect should have comment or be unexported (golint)

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!