Preparing report...

Report for github.com/alipay/sofa-mesh

A+    Excellent!    Found 239 issues across 1394 files

Tweet

gofmt96%

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!


golint93%

Golint is a linter for Go source code.

    • sofa-mesh/pilot/tools/debug/pilot_cli.go
    • Line 80: warning: exported const LocalPortStart should have comment (or a comment on this block) or be unexported (golint)
    • Line 104: warning: exported function NewPodInfo should have comment or be unexported (golint)
    • Line 243: warning: error should be the last type when returning multiple items (golint)
    • sofa-mesh/pkg/spiffe/spiffe.go
    • Line 11: warning: exported const Scheme should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported function SetTrustDomain should have comment or be unexported (golint)
    • Line 23: warning: exported function GetTrustDomain should have comment or be unexported (golint)
    • Line 27: warning: exported function DetermineTrustDomain should have comment or be unexported (golint)
    • sofa-mesh/mixer/template/template.gen.go
    • Line 120: warning: exported var SupportedTmplInfo should have comment or be unexported (golint)
    • Line 2127: warning: don't use underscores in Go names; type builder_adapter_template_kubernetes_Template should be builderAdapterTemplateKubernetesTemplate (golint)
    • Line 2151: warning: don't use underscores in Go names; func newBuilder_adapter_template_kubernetes_Template should be newBuilderAdapterTemplateKubernetesTemplate (golint)
    • Line 2318: warning: don't use underscores in Go names; type builder_apikey_Template should be builderApikeyTemplate (golint)
    • Line 2342: warning: don't use underscores in Go names; func newBuilder_apikey_Template should be newBuilderApikeyTemplate (golint)
    • Line 2514: warning: don't use underscores in Go names; type builder_authorization_Template should be builderAuthorizationTemplate (golint)
    • Line 2526: warning: don't use underscores in Go names; func newBuilder_authorization_Template should be newBuilderAuthorizationTemplate (golint)
    • Line 2602: warning: don't use underscores in Go names; type builder_authorization_Subject should be builderAuthorizationSubject (golint)
    • Line 2618: warning: don't use underscores in Go names; func newBuilder_authorization_Subject should be newBuilderAuthorizationSubject (golint)
    • Line 2742: warning: don't use underscores in Go names; type builder_authorization_Action should be builderAuthorizationAction (golint)
    • Line 2766: warning: don't use underscores in Go names; func newBuilder_authorization_Action should be newBuilderAuthorizationAction (golint)
    • Line 2940: warning: don't use underscores in Go names; type builder_checknothing_Template should be builderChecknothingTemplate (golint)
    • Line 2944: warning: don't use underscores in Go names; func newBuilder_checknothing_Template should be newBuilderChecknothingTemplate (golint)
    • Line 2996: warning: don't use underscores in Go names; type builder_edge_Template should be builderEdgeTemplate (golint)
    • Line 3052: warning: don't use underscores in Go names; func newBuilder_edge_Template should be newBuilderEdgeTemplate (golint)
    • Line 3424: warning: don't use underscores in Go names; type builder_listentry_Template should be builderListentryTemplate (golint)
    • Line 3432: warning: don't use underscores in Go names; func newBuilder_listentry_Template should be newBuilderListentryTemplate (golint)
    • Line 3504: warning: don't use underscores in Go names; type builder_logentry_Template should be builderLogentryTemplate (golint)
    • Line 3528: warning: don't use underscores in Go names; func newBuilder_logentry_Template should be newBuilderLogentryTemplate (golint)
    • Line 3694: warning: don't use underscores in Go names; type builder_metric_Template should be builderMetricTemplate (golint)
    • Line 3714: warning: don't use underscores in Go names; func newBuilder_metric_Template should be newBuilderMetricTemplate (golint)
    • Line 3855: warning: don't use underscores in Go names; type builder_quota_Template should be builderQuotaTemplate (golint)
    • Line 3863: warning: don't use underscores in Go names; func newBuilder_quota_Template should be newBuilderQuotaTemplate (golint)
    • Line 3937: warning: don't use underscores in Go names; type builder_reportnothing_Template should be builderReportnothingTemplate (golint)
    • Line 3941: warning: don't use underscores in Go names; func newBuilder_reportnothing_Template should be newBuilderReportnothingTemplate (golint)
    • Line 3993: warning: don't use underscores in Go names; type builder_tracespan_Template should be builderTracespanTemplate (golint)
    • Line 4073: warning: don't use underscores in Go names; func newBuilder_tracespan_Template should be newBuilderTracespanTemplate (golint)
    • sofa-mesh/mixer/test/spyAdapter/template/apa/tmpl_handler.gen.go
    • Line 27: warning: comment on exported const TemplateName should be of the form "TemplateName ..." (golint)
    • Line 67: warning: exported function NewOutput should have comment or be unexported (golint)
    • Line 71: warning: exported method Output.SetInt64Primitive should have comment or be unexported (golint)
    • Line 76: warning: exported method Output.SetBoolPrimitive should have comment or be unexported (golint)
    • Line 81: warning: exported method Output.SetDoublePrimitive should have comment or be unexported (golint)
    • Line 86: warning: exported method Output.SetStringPrimitive should have comment or be unexported (golint)
    • Line 91: warning: exported method Output.SetStringMap should have comment or be unexported (golint)
    • Line 96: warning: exported method Output.SetIp should have comment or be unexported (golint)
    • Line 101: warning: exported method Output.SetDuration should have comment or be unexported (golint)
    • Line 106: warning: exported method Output.SetTimestamp should have comment or be unexported (golint)
    • Line 111: warning: exported method Output.SetDns should have comment or be unexported (golint)
    • Line 116: warning: exported method Output.WasSet should have comment or be unexported (golint)
    • sofa-mesh/mixer/test/spyAdapter/template/template.gen.go
    • Line 106: warning: exported var SupportedTmplInfo should have comment or be unexported (golint)
    • Line 894: warning: don't use underscores in Go names; type builder_sampleapa_Template should be builderSampleapaTemplate (golint)
    • Line 914: warning: don't use underscores in Go names; func newBuilder_sampleapa_Template should be newBuilderSampleapaTemplate (golint)
    • Line 1066: warning: don't use underscores in Go names; type builder_samplecheck_Template should be builderSamplecheckTemplate (golint)
    • Line 1074: warning: don't use underscores in Go names; func newBuilder_samplecheck_Template should be newBuilderSamplecheckTemplate (golint)
    • Line 1151: warning: don't use underscores in Go names; type builder_checkproducer_Template should be builderCheckproducerTemplate (golint)
    • Line 1159: warning: don't use underscores in Go names; func newBuilder_checkproducer_Template should be newBuilderCheckproducerTemplate (golint)
    • Line 1236: warning: don't use underscores in Go names; type builder_samplequota_Template should be builderSamplequotaTemplate (golint)
    • Line 1244: warning: don't use underscores in Go names; func newBuilder_samplequota_Template should be newBuilderSamplequotaTemplate (golint)
    • Line 1318: warning: don't use underscores in Go names; type builder_samplereport_Template should be builderSamplereportTemplate (golint)
    • Line 1330: warning: don't use underscores in Go names; func newBuilder_samplereport_Template should be newBuilderSamplereportTemplate (golint)
    • sofa-mesh/pilot/pkg/model/context.go
    • Line 194: warning: exported method Proxy.SetServiceInstances should have comment or be unexported (golint)
    • Line 205: warning: exported method Proxy.SetWorkloadLabels should have comment or be unexported (golint)
    • Line 352: warning: comment on exported const DefaultCertChain should be of the form "DefaultCertChain ..." (golint)
    • Line 358: warning: comment on exported const DefaultKey should be of the form "DefaultKey ..." (golint)
    • sofa-mesh/pkg/mcp/internal/test/auth_checker.go
    • Line 23: warning: exported type FakeAuthChecker should have comment or be unexported (golint)
    • Line 27: warning: exported function NewFakeAuthChecker should have comment or be unexported (golint)
    • Line 31: warning: exported method FakeAuthChecker.Check should have comment or be unexported (golint)
    • Line 35: warning: exported method FakeAuthChecker.AuthType should have comment or be unexported (golint)
    • sofa-mesh/pkg/test/framework/api/component/configuration.go
    • Line 26: warning: comment on exported type ConfiguredRequirement should be of the form "ConfiguredRequirement ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported function NewNamedRequirement should be of the form "NewNamedRequirement ..." (golint)
    • Line 39: warning: comment on exported function NewConfiguredRequirement should be of the form "NewConfiguredRequirement ..." (golint)
    • Line 48: warning: exported method ConfiguredRequirement.GetName should have comment or be unexported (golint)
    • Line 52: warning: exported method ConfiguredRequirement.GetRequirement should have comment or be unexported (golint)
    • Line 56: warning: exported method ConfiguredRequirement.GetConfiguration should have comment or be unexported (golint)
    • sofa-mesh/mixer/adapter/kubernetesenv/template/template_handler.gen.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 58: warning: comment on exported const TemplateName should be of the form "TemplateName ..." (golint)
    • Line 168: warning: exported function NewOutput should have comment or be unexported (golint)
    • Line 172: warning: exported method Output.SetSourcePodUid should have comment or be unexported (golint)
    • Line 177: warning: exported method Output.SetSourcePodIp should have comment or be unexported (golint)
    • Line 182: warning: exported method Output.SetSourcePodName should have comment or be unexported (golint)
    • Line 187: warning: exported method Output.SetSourceLabels should have comment or be unexported (golint)
    • Line 192: warning: exported method Output.SetSourceNamespace should have comment or be unexported (golint)
    • Line 197: warning: exported method Output.SetSourceServiceAccountName should have comment or be unexported (golint)
    • Line 202: warning: exported method Output.SetSourceHostIp should have comment or be unexported (golint)
    • Line 207: warning: exported method Output.SetSourceWorkloadUid should have comment or be unexported (golint)
    • Line 212: warning: exported method Output.SetSourceWorkloadName should have comment or be unexported (golint)
    • Line 217: warning: exported method Output.SetSourceWorkloadNamespace should have comment or be unexported (golint)
    • Line 222: warning: exported method Output.SetSourceOwner should have comment or be unexported (golint)
    • Line 227: warning: exported method Output.SetDestinationPodUid should have comment or be unexported (golint)
    • Line 232: warning: exported method Output.SetDestinationPodIp should have comment or be unexported (golint)
    • Line 237: warning: exported method Output.SetDestinationPodName should have comment or be unexported (golint)
    • Line 242: warning: exported method Output.SetDestinationContainerName should have comment or be unexported (golint)
    • Line 247: warning: exported method Output.SetDestinationLabels should have comment or be unexported (golint)
    • Line 252: warning: exported method Output.SetDestinationNamespace should have comment or be unexported (golint)
    • Line 257: warning: exported method Output.SetDestinationServiceAccountName should have comment or be unexported (golint)
    • Line 262: warning: exported method Output.SetDestinationHostIp should have comment or be unexported (golint)
    • Line 267: warning: exported method Output.SetDestinationOwner should have comment or be unexported (golint)
    • Line 272: warning: exported method Output.SetDestinationWorkloadUid should have comment or be unexported (golint)
    • Line 277: warning: exported method Output.SetDestinationWorkloadName should have comment or be unexported (golint)
    • Line 282: warning: exported method Output.SetDestinationWorkloadNamespace should have comment or be unexported (golint)
    • Line 287: warning: exported method Output.WasSet should have comment or be unexported (golint)
    • sofa-mesh/pkg/adsc/adsc.go
    • Line 402: warning: exported type Target should have comment or be unexported (golint)
    • Line 411: warning: exported type Endpoint should have comment or be unexported (golint)
    • Line 532: warning: exported method ADSC.Send should have comment or be unexported (golint)
    • sofa-mesh/mixer/template/authorization/template_handler.gen.go
    • Line 51: warning: comment on exported const TemplateName should be of the form "TemplateName ..." (golint)
    • Line 75: warning: comment on exported type Subject should be of the form "Subject ..." (with optional leading article) (golint)
    • Line 92: warning: comment on exported type Action should be of the form "Action ..." (with optional leading article) (golint)
    • sofa-mesh/pilot/pkg/registeragent/exporter/sofa/export.go
    • Line 27: warning: exported type SimpleRpcInfoExporter should have comment or be unexported (golint)
    • Line 30: warning: exported function NewRpcInfoExporter should have comment or be unexported (golint)
    • Line 35: warning: exported type ProviderInterface should have comment or be unexported (golint)
    • Line 42: warning: exported type InterfacesDTO should have comment or be unexported (golint)
    • Line 47: warning: exported type HealthInfo should have comment or be unexported (golint)
    • Line 52: warning: exported type HealthCheckInfo should have comment or be unexported (golint)
    • Line 57: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 61: warning: exported method SimpleRpcInfoExporter.GetRpcServiceInfo should have comment or be unexported (golint)
    • sofa-mesh/pkg/mcp/internal/test/types.go
    • Line 1: warning: package comment should be of the form "Package test ..." (golint)
    • Line 29: warning: exported type FakeTypeBase should have comment or be unexported (golint)
    • Line 31: warning: exported method FakeTypeBase.Reset should have comment or be unexported (golint)
    • Line 33: warning: exported method FakeTypeBase.ProtoMessage should have comment or be unexported (golint)
    • Line 34: warning: exported method FakeTypeBase.Marshal should have comment or be unexported (golint)
    • Line 35: warning: exported method FakeTypeBase.Unmarshal should have comment or be unexported (golint)
    • Line 40: warning: exported type FakeType0 should have comment or be unexported (golint)
    • Line 41: warning: exported type FakeType1 should have comment or be unexported (golint)
    • Line 42: warning: exported type FakeType2 should have comment or be unexported (golint)
    • Line 44: warning: exported type UnmarshalErrorType should have comment or be unexported (golint)
    • Line 46: warning: exported method UnmarshalErrorType.Unmarshal should have comment or be unexported (golint)
    • Line 49: warning: exported const TypePrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported var FakeType0Collection should have comment or be unexported (golint)
    • Line 68: warning: exported type Fake should have comment or be unexported (golint)
    • Line 76: warning: exported function MakeRequest should have comment or be unexported (golint)
    • Line 89: warning: exported function MakeResources should have comment or be unexported (golint)
    • Line 103: warning: exported function MakeFakeResource should have comment or be unexported (golint)
    • Line 140: warning: exported var Type0A should have comment or be unexported (golint)
    • sofa-mesh/pkg/mcp/sink/journal.go
    • Line 37: warning: exported method JournaledRequest.ToMeshConfigRequest should have comment or be unexported (golint)
    • Line 68: warning: exported function NewRequestJournal should have comment or be unexported (golint)
    • Line 74: warning: exported method RecentRequestsJournal.RecordMeshConfigRequest should have comment or be unexported (golint)
    • Line 100: warning: exported method RecentRequestsJournal.RecordRequestResources should have comment or be unexported (golint)
    • Line 125: warning: exported method RecentRequestsJournal.Snapshot should have comment or be unexported (golint)
    • sofa-mesh/security/cmd/node_agent_k8s/main.go
    • Line 81: warning: comment on exported const SecretRefreshGraceDuration should be of the form "SecretRefreshGraceDuration ..." (golint)
    • Line 86: warning: comment on exported const SecretRotationJobRunInterval should be of the form "SecretRotationJobRunInterval ..." (golint)
    • sofa-mesh/pilot/pkg/registeragent/exporter/default/export.go
    • Line 15: warning: don't use an underscore in package name (golint)
    • Line 23: warning: exported type SimpleRpcInfoExporter should have comment or be unexported (golint)
    • Line 26: warning: exported function NewRpcInfoExporter should have comment or be unexported (golint)
    • Line 31: warning: exported method SimpleRpcInfoExporter.GetRpcServiceInfo should have comment or be unexported (golint)
    • sofa-mesh/pkg/mcp/server/listchecker.go
    • Line 65: warning: exported type ListAuthCheckerOptions should have comment or be unexported (golint)
    • Line 78: warning: exported function DefaultListAuthCheckerOptions should have comment or be unexported (golint)
    • Line 177: warning: exported method ListAuthChecker.Check should have comment or be unexported (golint)
    • sofa-mesh/pilot/pkg/networking/util/util.go
    • Line 299: warning: exported function LocalityMatch should have comment or be unexported (golint)
    • Line 311: warning: exported function SplitLocality should have comment or be unexported (golint)
    • Line 323: warning: exported function LbPriority should have comment or be unexported (golint)
    • Line 336: warning: comment on exported function CloneCluster should be of the form "CloneCluster ..." (golint)
    • Line 350: warning: comment on exported function CloneClusterLoadAssignment should be of the form "CloneClusterLoadAssignment ..." (golint)
    • sofa-mesh/pilot/pkg/networking/core/v1alpha3/configgen.go
    • Line 28: warning: exported type ConfigGeneratorImpl should have comment or be unexported (golint)
    • Line 39: warning: exported function NewConfigGenerator should have comment or be unexported (golint)
    • Line 45: warning: exported method ConfigGeneratorImpl.BuildSharedPushState should have comment or be unexported (golint)
    • Line 116: warning: exported method ConfigGeneratorImpl.CanUsePrecomputedCDS should have comment or be unexported (golint)
    • sofa-mesh/mixer/template/sample/template.gen.go
    • Line 106: warning: exported var SupportedTmplInfo should have comment or be unexported (golint)
    • Line 1570: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_myapa_Template should be builderIstioMixerAdapterSampleMyapaTemplate (golint)
    • Line 1614: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_myapa_Template should be newBuilderIstioMixerAdapterSampleMyapaTemplate (golint)
    • Line 1889: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_myapa_Resource1 should be builderIstioMixerAdapterSampleMyapaResource1 (golint)
    • Line 1905: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_myapa_Resource1 should be newBuilderIstioMixerAdapterSampleMyapaResource1 (golint)
    • Line 2006: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_myapa_Resource2 should be builderIstioMixerAdapterSampleMyapaResource2 (golint)
    • Line 2022: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_myapa_Resource2 should be newBuilderIstioMixerAdapterSampleMyapaResource2 (golint)
    • Line 2127: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_myapa_Resource3 should be builderIstioMixerAdapterSampleMyapaResource3 (golint)
    • Line 2159: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_myapa_Resource3 should be newBuilderIstioMixerAdapterSampleMyapaResource3 (golint)
    • Line 2378: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_check_Template should be builderIstioMixerAdapterSampleCheckTemplate (golint)
    • Line 2394: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_check_Template should be newBuilderIstioMixerAdapterSampleCheckTemplate (golint)
    • Line 2510: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_check_Res1 should be builderIstioMixerAdapterSampleCheckRes1 (golint)
    • Line 2558: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_check_Res1 should be newBuilderIstioMixerAdapterSampleCheckRes1 (golint)
    • Line 2847: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_check_Res2 should be builderIstioMixerAdapterSampleCheckRes2 (golint)
    • Line 2863: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_check_Res2 should be newBuilderIstioMixerAdapterSampleCheckRes2 (golint)
    • Line 2982: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_quota_Template should be builderIstioMixerAdapterSampleQuotaTemplate (golint)
    • Line 2998: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_quota_Template should be newBuilderIstioMixerAdapterSampleQuotaTemplate (golint)
    • Line 3111: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_quota_Res1 should be builderIstioMixerAdapterSampleQuotaRes1 (golint)
    • Line 3159: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_quota_Res1 should be newBuilderIstioMixerAdapterSampleQuotaRes1 (golint)
    • Line 3448: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_quota_Res2 should be builderIstioMixerAdapterSampleQuotaRes2 (golint)
    • Line 3464: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_quota_Res2 should be newBuilderIstioMixerAdapterSampleQuotaRes2 (golint)
    • Line 3583: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_report_Template should be builderIstioMixerAdapterSampleReportTemplate (golint)
    • Line 3627: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_report_Template should be newBuilderIstioMixerAdapterSampleReportTemplate (golint)
    • Line 3900: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_report_Res1 should be builderIstioMixerAdapterSampleReportRes1 (golint)
    • Line 3948: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_report_Res1 should be newBuilderIstioMixerAdapterSampleReportRes1 (golint)
    • Line 4237: warning: don't use underscores in Go names; type builder_istio_mixer_adapter_sample_report_Res2 should be builderIstioMixerAdapterSampleReportRes2 (golint)
    • Line 4277: warning: don't use underscores in Go names; func newBuilder_istio_mixer_adapter_sample_report_Res2 should be newBuilderIstioMixerAdapterSampleReportRes2 (golint)
    • sofa-mesh/pilot/pkg/registeragent/exporter/dubbo/export.go
    • Line 26: warning: exported type SimpleRpcInfoExporter should have comment or be unexported (golint)
    • Line 29: warning: exported function NewRpcInfoExporter should have comment or be unexported (golint)
    • Line 34: warning: exported type ProviderInterface should have comment or be unexported (golint)
    • Line 41: warning: exported type InterfacesDTO should have comment or be unexported (golint)
    • Line 46: warning: exported type Info should have comment or be unexported (golint)
    • Line 48: warning: exported method SimpleRpcInfoExporter.GetRpcServiceInfo should have comment or be unexported (golint)
    • sofa-mesh/pkg/test/util/structpath/structpath.go
    • Line 36: warning: exported type Structpath should have comment or be unexported (golint)
    • Line 42: warning: comment on exported function AssertThatProto should be of the form "AssertThatProto ..." (golint)
    • Line 69: warning: exported method Structpath.ForTest should have comment or be unexported (golint)
    • Line 73: warning: exported method Structpath.Accept should have comment or be unexported (golint)
    • Line 84: warning: exported method Structpath.Select should have comment or be unexported (golint)
    • Line 94: warning: exported method Structpath.Equals should have comment or be unexported (golint)
    • Line 160: warning: exported method Structpath.Exists should have comment or be unexported (golint)
    • Line 169: warning: exported method Structpath.NotExists should have comment or be unexported (golint)
    • sofa-mesh/galley/pkg/runtime/monitoring/monitoring.go
    • Line 79: warning: comment on exported function RecordStrategyOnChange should be of the form "RecordStrategyOnChange ..." (golint)
    • Line 84: warning: comment on exported function RecordOnTimer should be of the form "RecordOnTimer ..." (golint)
    • Line 97: warning: comment on exported function RecordProcessorEventProcessed should be of the form "RecordProcessorEventProcessed ..." (golint)
    • Line 103: warning: comment on exported function RecordProcessorSnapshotPublished should be of the form "RecordProcessorSnapshotPublished ..." (golint)
    • Line 110: warning: comment on exported function RecordStateTypeCount should be of the form "RecordStateTypeCount ..." (golint)
    • sofa-mesh/mixer/test/spyAdapter/template/checkoutput/tmpl_handler.gen.go
    • Line 25: warning: comment on exported const TemplateName should be of the form "TemplateName ..." (golint)
    • Line 55: warning: exported function NewOutput should have comment or be unexported (golint)
    • Line 59: warning: exported method Output.SetInt64Primitive should have comment or be unexported (golint)
    • Line 64: warning: exported method Output.SetBoolPrimitive should have comment or be unexported (golint)
    • Line 69: warning: exported method Output.SetDoublePrimitive should have comment or be unexported (golint)
    • Line 74: warning: exported method Output.SetStringPrimitive should have comment or be unexported (golint)
    • Line 79: warning: exported method Output.SetStringMap should have comment or be unexported (golint)
    • Line 84: warning: exported method Output.WasSet should have comment or be unexported (golint)
    • sofa-mesh/pkg/mcp/source/source.go
    • Line 125: warning: comment on exported type Source should be of the form "Source ..." (with optional leading article) (golint)
    • Line 166: warning: exported const DefaultRetryPushDelay should have comment or be unexported (golint)
    • sofa-mesh/mixer/template/sample/apa/Apa_handler.gen.go
    • Line 17: warning: don't use an underscore in package name (golint)
    • Line 27: warning: comment on exported const TemplateName should be of the form "TemplateName ..." (golint)
    • Line 81: warning: exported function NewOutput should have comment or be unexported (golint)
    • Line 85: warning: exported method Output.SetInt64Primitive should have comment or be unexported (golint)
    • Line 90: warning: exported method Output.SetBoolPrimitive should have comment or be unexported (golint)
    • Line 95: warning: exported method Output.SetDoublePrimitive should have comment or be unexported (golint)
    • Line 100: warning: exported method Output.SetStringPrimitive should have comment or be unexported (golint)
    • Line 105: warning: exported method Output.SetTimeStamp should have comment or be unexported (golint)
    • Line 110: warning: exported method Output.SetDuration should have comment or be unexported (golint)
    • Line 115: warning: exported method Output.SetEmail should have comment or be unexported (golint)
    • Line 120: warning: exported method Output.SetOutIp should have comment or be unexported (golint)
    • Line 125: warning: exported method Output.SetOutStrMap should have comment or be unexported (golint)
    • Line 130: warning: exported method Output.WasSet should have comment or be unexported (golint)
    • Line 135: warning: exported type Resource1 should have comment or be unexported (golint)
    • Line 143: warning: exported type Resource2 should have comment or be unexported (golint)
    • Line 151: warning: comment on exported type Resource3 should be of the form "Resource3 ..." (with optional leading article) (golint)
    • sofa-mesh/tests/e2e/tests/pilot/cloudfoundry/mock/copilot.go
    • Line 28: warning: exported type CopilotHandler should have comment or be unexported (golint)
    • Line 34: warning: exported method CopilotHandler.PopulateInternalRoute should have comment or be unexported (golint)
    • Line 51: warning: exported method CopilotHandler.PopulateRoute should have comment or be unexported (golint)
    • Line 71: warning: exported method CopilotHandler.Health should have comment or be unexported (golint)
    • Line 77: warning: exported method CopilotHandler.InternalRoutes should have comment or be unexported (golint)
    • Line 85: warning: exported method CopilotHandler.Routes should have comment or be unexported (golint)
    • sofa-mesh/galley/pkg/runtime/resource/schema.go
    • Line 81: warning: comment on exported method SchemaBuilder.RegisterInfo should be of the form "RegisterInfo ..." (golint)
    • Line 87: warning: comment on exported method SchemaBuilder.RegisterSchema should be of the form "RegisterSchema ..." (golint)
    • Line 95: warning: comment on exported method SchemaBuilder.UnregisterSchema should be of the form "UnregisterSchema ..." (golint)
    • Line 103: warning: comment on exported method SchemaBuilder.UnregisterInfo should be of the form "UnregisterInfo ..." (golint)
    • sofa-mesh/pilot/pkg/serviceregistry/zookeeper/types.go
    • Line 22: warning: exported type ServiceEventType should have comment or be unexported (golint)
    • Line 24: warning: exported type ServiceEvent should have comment or be unexported (golint)
    • Line 30: warning: exported type Port should have comment or be unexported (golint)
    • Line 35: warning: exported type Service should have comment or be unexported (golint)
    • Line 64: warning: exported const ServiceAdded should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: exported method Port.Portoi should have comment or be unexported (golint)
    • Line 78: warning: exported method Service.AddPort should have comment or be unexported (golint)
    • Line 91: warning: exported method Service.Hostname should have comment or be unexported (golint)
    • Line 95: warning: exported method Service.Ports should have comment or be unexported (golint)
    • Line 99: warning: exported method Service.Instances should have comment or be unexported (golint)
    • sofa-mesh/pkg/api/rpccontroller.istio.io/v1/types.go
    • Line 27: warning: exported type RpcService should have comment or be unexported (golint)
    • Line 35: warning: exported type RpcServiceSpec should have comment or be unexported (golint)
    • Line 42: warning: exported type RpcServiceStatus should have comment or be unexported (golint)
    • Line 47: warning: exported type RpcServiceList should have comment or be unexported (golint)
    • sofa-mesh/pkg/mcp/internal/queue.go
    • Line 175: warning: exported method UniqueQueue.Ready should have comment or be unexported (golint)
    • Line 179: warning: exported method UniqueQueue.Done should have comment or be unexported (golint)
    • Line 183: warning: exported method UniqueQueue.Close should have comment or be unexported (golint)
    • sofa-mesh/pilot/pkg/serviceregistry/zookeeper/controller.go
    • Line 136: warning: receiver name sd should be consistent with previous receiver name c for Controller (golint)
    • Line 171: warning: comment on exported method Controller.InstancesByPort should be of the form "InstancesByPort ..." (golint)
    • Line 188: warning: exported method Controller.GetProxyServiceInstances should have comment or be unexported (golint)
    • Line 200: warning: exported method Controller.ManagementPorts should have comment or be unexported (golint)

gocyclo91%

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.

    • sofa-mesh/mixer/pkg/il/text/read.go
    • Line 158: warning: cyclomatic complexity 35 of function (*parser).parseFunctionBody() is high (> 15) (gocyclo)
    • Line 80: warning: cyclomatic complexity 16 of function (*parser).parseFunctionDef() is high (> 15) (gocyclo)
    • sofa-mesh/mixer/template/template.gen.go
    • Line 4073: warning: cyclomatic complexity 54 of function newBuilder_tracespan_Template() is high (> 15) (gocyclo)
    • Line 3052: warning: cyclomatic complexity 40 of function newBuilder_edge_Template() is high (> 15) (gocyclo)
    • Line 4357: warning: cyclomatic complexity 40 of function (*builder_tracespan_Template).build() is high (> 15) (gocyclo)
    • Line 3266: warning: cyclomatic complexity 28 of function (*builder_edge_Template).build() is high (> 15) (gocyclo)
    • Line 2342: warning: cyclomatic complexity 16 of function newBuilder_apikey_Template() is high (> 15) (gocyclo)
    • Line 2766: warning: cyclomatic complexity 16 of function newBuilder_authorization_Action() is high (> 15) (gocyclo)
    • sofa-mesh/pilot/pkg/networking/core/v1alpha3/listener.go
    • Line 907: warning: cyclomatic complexity 37 of function (*ConfigGeneratorImpl).buildSidecarOutboundListenerForPortOrUDS() is high (> 15) (gocyclo)
    • Line 649: warning: cyclomatic complexity 26 of function (*ConfigGeneratorImpl).buildSidecarOutboundListeners() is high (> 15) (gocyclo)
    • Line 1548: warning: cyclomatic complexity 23 of function buildListener() is high (> 15) (gocyclo)
    • Line 460: warning: cyclomatic complexity 16 of function (*ConfigGeneratorImpl).buildSidecarInboundListenerForPortOrUDS() is high (> 15) (gocyclo)
    • sofa-mesh/pilot/pkg/model/validation.go
    • Line 2139: warning: cyclomatic complexity 41 of function ValidateServiceEntry() is high (> 15) (gocyclo)
    • Line 659: warning: cyclomatic complexity 25 of function ValidateSidecar() is high (> 15) (gocyclo)
    • Line 1756: warning: cyclomatic complexity 22 of function validateHTTPRoute() is high (> 15) (gocyclo)
    • Line 1607: warning: cyclomatic complexity 21 of function ValidateVirtualService() is high (> 15) (gocyclo)
    • Line 1133: warning: cyclomatic complexity 21 of function ValidateProxyConfig() is high (> 15) (gocyclo)
    • Line 2381: warning: cyclomatic complexity 20 of function validateLocalities() is high (> 15) (gocyclo)
    • Line 1257: warning: cyclomatic complexity 19 of function ValidateHTTPAPISpec() is high (> 15) (gocyclo)
    • Line 1209: warning: cyclomatic complexity 18 of function ValidateMixerAttributes() is high (> 15) (gocyclo)
    • Line 1339: warning: cyclomatic complexity 16 of function ValidateQuotaSpec() is high (> 15) (gocyclo)
    • sofa-mesh/tests/e2e/tests/pilot/routing_test.go
    • Line 431: warning: cyclomatic complexity 36 of function TestHeadersManipulations() is high (> 15) (gocyclo)
    • Line 790: warning: cyclomatic complexity 20 of function TestSidecarScope() is high (> 15) (gocyclo)
    • Line 657: warning: cyclomatic complexity 20 of function TestDestinationRuleExportTo() is high (> 15) (gocyclo)
    • sofa-mesh/tests/e2e/framework/kubernetes.go
    • Line 643: warning: cyclomatic complexity 28 of function (*KubeInfo).deployIstio() is high (> 15) (gocyclo)
    • Line 1029: warning: cyclomatic complexity 21 of function (*KubeInfo).generateIstio() is high (> 15) (gocyclo)
    • Line 481: warning: cyclomatic complexity 21 of function (*KubeInfo).Teardown() is high (> 15) (gocyclo)
    • Line 852: warning: cyclomatic complexity 19 of function (*KubeInfo).deployIstioWithHelm() is high (> 15) (gocyclo)
    • sofa-mesh/mixer/template/sample/template.gen.go
    • Line 3948: warning: cyclomatic complexity 28 of function newBuilder_istio_mixer_adapter_sample_report_Res1() is high (> 15) (gocyclo)
    • Line 2558: warning: cyclomatic complexity 28 of function newBuilder_istio_mixer_adapter_sample_check_Res1() is high (> 15) (gocyclo)
    • Line 3159: warning: cyclomatic complexity 28 of function newBuilder_istio_mixer_adapter_sample_quota_Res1() is high (> 15) (gocyclo)
    • Line 1614: warning: cyclomatic complexity 27 of function newBuilder_istio_mixer_adapter_sample_myapa_Template() is high (> 15) (gocyclo)
    • Line 3627: warning: cyclomatic complexity 26 of function newBuilder_istio_mixer_adapter_sample_report_Template() is high (> 15) (gocyclo)
    • Line 4100: warning: cyclomatic complexity 24 of function (*builder_istio_mixer_adapter_sample_report_Res1).build() is high (> 15) (gocyclo)
    • Line 3311: warning: cyclomatic complexity 24 of function (*builder_istio_mixer_adapter_sample_quota_Res1).build() is high (> 15) (gocyclo)
    • Line 2710: warning: cyclomatic complexity 24 of function (*builder_istio_mixer_adapter_sample_check_Res1).build() is high (> 15) (gocyclo)
    • Line 1762: warning: cyclomatic complexity 22 of function (*builder_istio_mixer_adapter_sample_myapa_Template).build() is high (> 15) (gocyclo)
    • Line 3770: warning: cyclomatic complexity 22 of function (*builder_istio_mixer_adapter_sample_report_Template).build() is high (> 15) (gocyclo)
    • Line 2159: warning: cyclomatic complexity 21 of function newBuilder_istio_mixer_adapter_sample_myapa_Resource3() is high (> 15) (gocyclo)
    • Line 4277: warning: cyclomatic complexity 21 of function newBuilder_istio_mixer_adapter_sample_report_Res2() is high (> 15) (gocyclo)
    • Line 4396: warning: cyclomatic complexity 20 of function (*builder_istio_mixer_adapter_sample_report_Res2).build() is high (> 15) (gocyclo)
    • Line 2278: warning: cyclomatic complexity 16 of function (*builder_istio_mixer_adapter_sample_myapa_Resource3).build() is high (> 15) (gocyclo)
    • sofa-mesh/pilot/pkg/proxy/envoy/v2/ads.go
    • Line 368: warning: cyclomatic complexity 46 of function (*DiscoveryServer).StreamAggregatedResources() is high (> 15) (gocyclo)
    • Line 669: warning: cyclomatic complexity 20 of function (*DiscoveryServer).pushConnection() is high (> 15) (gocyclo)
    • sofa-mesh/mixer/pkg/lang/compiler/compiler.go
    • Line 280: warning: cyclomatic complexity 19 of function (*generator).generateEq() is high (> 15) (gocyclo)
    • Line 234: warning: cyclomatic complexity 18 of function (*generator).generateFunction() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 17 of function (*generator).generateVariable() is high (> 15) (gocyclo)

ineffassign99%

IneffAssign detects ineffectual assignments in Go code.

    • sofa-mesh/mixer/template/sample/template.gen.go
    • Line 240: warning: ineffectual assignment to BuildResource1 (ineffassign)
    • Line 262: warning: ineffectual assignment to BuildResource2 (ineffassign)
    • Line 284: warning: ineffectual assignment to BuildResource3 (ineffassign)
    • Line 1712: warning: ineffectual assignment to expType (ineffassign)
    • Line 1722: warning: ineffectual assignment to expType (ineffassign)
    • Line 1741: warning: ineffectual assignment to expType (ineffassign)
    • Line 1751: warning: ineffectual assignment to expType (ineffassign)
    • Line 2257: warning: ineffectual assignment to expType (ineffassign)
    • Line 2267: warning: ineffectual assignment to expType (ineffassign)
    • Line 2581: warning: ineffectual assignment to expType (ineffassign)
    • Line 2591: warning: ineffectual assignment to expType (ineffassign)
    • Line 2676: warning: ineffectual assignment to expType (ineffassign)
    • Line 2686: warning: ineffectual assignment to expType (ineffassign)
    • Line 2886: warning: ineffectual assignment to expType (ineffassign)
    • Line 2896: warning: ineffectual assignment to expType (ineffassign)
    • Line 3021: warning: ineffectual assignment to expType (ineffassign)
    • Line 3182: warning: ineffectual assignment to expType (ineffassign)
    • Line 3192: warning: ineffectual assignment to expType (ineffassign)
    • Line 3277: warning: ineffectual assignment to expType (ineffassign)
    • Line 3287: warning: ineffectual assignment to expType (ineffassign)
    • Line 3487: warning: ineffectual assignment to expType (ineffassign)
    • Line 3497: warning: ineffectual assignment to expType (ineffassign)
    • Line 3650: warning: ineffectual assignment to expType (ineffassign)
    • Line 3660: warning: ineffectual assignment to expType (ineffassign)
    • Line 3745: warning: ineffectual assignment to expType (ineffassign)
    • Line 3755: warning: ineffectual assignment to expType (ineffassign)
    • Line 3971: warning: ineffectual assignment to expType (ineffassign)
    • Line 3981: warning: ineffectual assignment to expType (ineffassign)
    • Line 4066: warning: ineffectual assignment to expType (ineffassign)
    • Line 4076: warning: ineffectual assignment to expType (ineffassign)
    • Line 4300: warning: ineffectual assignment to expType (ineffassign)
    • Line 4310: warning: ineffectual assignment to expType (ineffassign)
    • Line 4335: warning: ineffectual assignment to expType (ineffassign)
    • Line 4345: warning: ineffectual assignment to expType (ineffassign)
    • Line 4355: warning: ineffectual assignment to expType (ineffassign)
    • Line 4365: warning: ineffectual assignment to expType (ineffassign)
    • Line 4375: warning: ineffectual assignment to expType (ineffassign)
    • Line 4385: warning: ineffectual assignment to expType (ineffassign)
    • sofa-mesh/mixer/template/template.gen.go
    • Line 2189: warning: ineffectual assignment to expType (ineffassign)
    • Line 2214: warning: ineffectual assignment to expType (ineffassign)
    • Line 2425: warning: ineffectual assignment to expType (ineffassign)
    • Line 2671: warning: ineffectual assignment to expType (ineffassign)
    • Line 2849: warning: ineffectual assignment to expType (ineffassign)
    • Line 3075: warning: ineffectual assignment to expType (ineffassign)
    • Line 3455: warning: ineffectual assignment to expType (ineffassign)
    • Line 3551: warning: ineffectual assignment to expType (ineffassign)
    • Line 3561: warning: ineffectual assignment to expType (ineffassign)
    • Line 3601: warning: ineffectual assignment to expType (ineffassign)
    • Line 3737: warning: ineffectual assignment to expType (ineffassign)
    • Line 3747: warning: ineffectual assignment to expType (ineffassign)
    • Line 3772: warning: ineffectual assignment to expType (ineffassign)
    • Line 3886: warning: ineffectual assignment to expType (ineffassign)
    • Line 4156: warning: ineffectual assignment to expType (ineffassign)
    • Line 4166: warning: ineffectual assignment to expType (ineffassign)
    • Line 4176: warning: ineffectual assignment to expType (ineffassign)
    • Line 4246: warning: ineffectual assignment to expType (ineffassign)
    • Line 4271: warning: ineffectual assignment to expType (ineffassign)

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!