Preparing report...

Report for github.com/alauda/kube-ovn

A+    Excellent!    Found 71 issues across 132 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!


gocyclo79%

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.

    • kube-ovn/pkg/controller/subnet.go
    • Line 432: warning: cyclomatic complexity 50 of function (*Controller).handleAddOrUpdateSubnet() is high (> 15) (gocyclo)
    • Line 816: warning: cyclomatic complexity 40 of function (*Controller).reconcileGateway() is high (> 15) (gocyclo)
    • Line 1145: warning: cyclomatic complexity 17 of function filterRepeatIPRange() is high (> 15) (gocyclo)
    • Line 235: warning: cyclomatic complexity 16 of function formatSubnet() is high (> 15) (gocyclo)
    • Line 758: warning: cyclomatic complexity 16 of function (*Controller).reconcileNamespaces() is high (> 15) (gocyclo)
    • kube-ovn/pkg/daemon/controller.go
    • Line 180: warning: cyclomatic complexity 35 of function (*Controller).reconcileRouters() is high (> 15) (gocyclo)
    • Line 415: warning: cyclomatic complexity 21 of function (*Controller).getPolicyRouting() is high (> 15) (gocyclo)
    • kube-ovn/pkg/daemon/handler.go
    • Line 51: warning: cyclomatic complexity 23 of function (cniServerHandler).handleAdd() is high (> 15) (gocyclo)
    • Line 217: warning: cyclomatic complexity 20 of function (cniServerHandler).handleDel() is high (> 15) (gocyclo)
    • kube-ovn/pkg/controller/gc.go
    • Line 252: warning: cyclomatic complexity 27 of function (*Controller).gcLoadBalancer() is high (> 15) (gocyclo)
    • Line 193: warning: cyclomatic complexity 16 of function (*Controller).markAndCleanLSP() is high (> 15) (gocyclo)
    • kube-ovn/pkg/speaker/bgpapiutil/attribute.go
    • Line 1112: warning: cyclomatic complexity 64 of function unmarshalAttribute() is high (> 15) (gocyclo)
    • Line 454: warning: cyclomatic complexity 47 of function UnmarshalNLRI() is high (> 15) (gocyclo)
    • Line 817: warning: cyclomatic complexity 23 of function unmarshalExComm() is high (> 15) (gocyclo)
    • Line 1023: warning: cyclomatic complexity 23 of function MarshalPathAttributes() is high (> 15) (gocyclo)
    • Line 705: warning: cyclomatic complexity 22 of function NewExtendedCommunitiesAttributeFromNative() is high (> 15) (gocyclo)
    • Line 323: warning: cyclomatic complexity 21 of function MarshalNLRI() is high (> 15) (gocyclo)
    • Line 274: warning: cyclomatic complexity 19 of function UnmarshalFlowSpecRules() is high (> 15) (gocyclo)
    • Line 32: warning: cyclomatic complexity 18 of function UnmarshalAttribute() is high (> 15) (gocyclo)
    • kube-ovn/pkg/daemon/ovs.go
    • Line 526: warning: cyclomatic complexity 23 of function configProviderNic() is high (> 15) (gocyclo)
    • Line 143: warning: cyclomatic complexity 21 of function configureContainerNic() is high (> 15) (gocyclo)
    • Line 423: warning: cyclomatic complexity 16 of function configureNic() is high (> 15) (gocyclo)
    • kube-ovn/pkg/controller/pod.go
    • Line 527: warning: cyclomatic complexity 33 of function (*Controller).handleUpdatePod() is high (> 15) (gocyclo)
    • Line 358: warning: cyclomatic complexity 21 of function (*Controller).handleAddPod() is high (> 15) (gocyclo)
    • Line 465: warning: cyclomatic complexity 17 of function (*Controller).handleDeletePod() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 16 of function (*Controller).enqueueAddPod() is high (> 15) (gocyclo)
    • Line 140: warning: cyclomatic complexity 16 of function (*Controller).enqueueUpdatePod() is high (> 15) (gocyclo)
    • kube-ovn/pkg/controller/node.go
    • Line 191: warning: cyclomatic complexity 17 of function (*Controller).handleAddNode() is high (> 15) (gocyclo)
    • Line 404: warning: cyclomatic complexity 17 of function (*Controller).checkGatewayReady() is high (> 15) (gocyclo)
    • kube-ovn/pkg/util/validator.go
    • Line 41: warning: cyclomatic complexity 26 of function ValidateSubnet() is high (> 15) (gocyclo)
    • Line 114: warning: cyclomatic complexity 18 of function ValidatePodNetwork() is high (> 15) (gocyclo)

golint55%

Golint is a linter for Go source code.

    • kube-ovn/pkg/pinger/metrics.go
    • Line 630: warning: exported function InitPingerMetrics should have comment or be unexported (golint)
    • Line 699: warning: exported function SetOvsUpMetrics should have comment or be unexported (golint)
    • Line 704: warning: exported function SetOvsDownMetrics should have comment or be unexported (golint)
    • Line 709: warning: exported function SetOvnControllerUpMetrics should have comment or be unexported (golint)
    • Line 714: warning: exported function SetOvnControllerDownMetrics should have comment or be unexported (golint)
    • Line 719: warning: exported function SetApiserverHealthyMetrics should have comment or be unexported (golint)
    • Line 725: warning: exported function SetApiserverUnhealthyMetrics should have comment or be unexported (golint)
    • Line 730: warning: exported function SetInternalDnsHealthyMetrics should have comment or be unexported (golint)
    • Line 736: warning: exported function SetInternalDnsUnhealthyMetrics should have comment or be unexported (golint)
    • Line 741: warning: exported function SetExternalDnsHealthyMetrics should have comment or be unexported (golint)
    • Line 747: warning: exported function SetExternalDnsUnhealthyMetrics should have comment or be unexported (golint)
    • Line 752: warning: exported function SetPodPingMetrics should have comment or be unexported (golint)
    • Line 779: warning: exported function SetNodePingMetrics should have comment or be unexported (golint)
    • Line 803: warning: exported function SetExternalPingMetrics should have comment or be unexported (golint)
    • kube-ovn/pkg/pinger/config.go
    • Line 15: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 49: warning: exported function ParseFlags should have comment or be unexported (golint)
    • kube-ovn/pkg/speaker/bgpapiutil/capability.go
    • Line 29: warning: exported function NewMultiProtocolCapability should have comment or be unexported (golint)
    • Line 36: warning: exported function NewRouteRefreshCapability should have comment or be unexported (golint)
    • Line 40: warning: exported function NewCarryingLabelInfoCapability should have comment or be unexported (golint)
    • Line 44: warning: exported function NewExtendedNexthopCapability should have comment or be unexported (golint)
    • Line 57: warning: exported function NewGracefulRestartCapability should have comment or be unexported (golint)
    • Line 72: warning: exported function NewFourOctetASNumberCapability should have comment or be unexported (golint)
    • Line 78: warning: exported function NewAddPathCapability should have comment or be unexported (golint)
    • Line 92: warning: exported function NewEnhancedRouteRefreshCapability should have comment or be unexported (golint)
    • Line 96: warning: exported function NewLongLivedGracefulRestartCapability should have comment or be unexported (golint)
    • Line 110: warning: exported function NewRouteRefreshCiscoCapability should have comment or be unexported (golint)
    • Line 114: warning: exported function NewUnknownCapability should have comment or be unexported (golint)
    • Line 121: warning: exported function MarshalCapability should have comment or be unexported (golint)
    • Line 152: warning: exported function MarshalCapabilities should have comment or be unexported (golint)
    • Line 237: warning: exported function UnmarshalCapabilities should have comment or be unexported (golint)
    • kube-ovn/pkg/apis/kubeovn/v1/status.go
    • Line 10: warning: exported method SubnetStatus.Bytes should have comment or be unexported (golint)
    • Line 21: warning: exported method VlanStatus.Bytes should have comment or be unexported (golint)
    • Line 31: warning: exported method VpcStatus.Bytes should have comment or be unexported (golint)
    • kube-ovn/pkg/ovs/ovs-vsctl.go
    • Line 17: warning: exported function Exec should have comment or be unexported (golint)
    • Line 212: warning: comment on exported function CleanDuplicatePort should be of the form "CleanDuplicatePort ..." (golint)
    • Line 225: warning: exported function SetPortTag should have comment or be unexported (golint)
    • kube-ovn/pkg/speaker/controller.go
    • Line 25: warning: exported type Controller should have comment or be unexported (golint)
    • Line 40: warning: exported function NewController should have comment or be unexported (golint)
    • Line 79: warning: exported method Controller.Run should have comment or be unexported (golint)
    • kube-ovn/pkg/ovs/ovn-nbctl.go
    • Line 47: warning: exported method Client.SetAzName should have comment or be unexported (golint)
    • Line 54: warning: exported method Client.SetICAutoRoute should have comment or be unexported (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 84: warning: exported method Client.CreateICLogicalRouterPort should have comment or be unexported (golint)
    • Line 102: warning: exported method Client.DeleteICLogicalRouterPort should have comment or be unexported (golint)
    • Line 153: warning: exported method Client.ListPodLogicalSwitchPorts should have comment or be unexported (golint)
    • Line 170: warning: exported method Client.SetLogicalSwitchConfig should have comment or be unexported (golint)
    • Line 279: warning: exported method Client.CreateGatewaySwitch should have comment or be unexported (golint)
    • Line 307: warning: exported method Client.DeleteGatewaySwitch should have comment or be unexported (golint)
    • Line 335: warning: exported method Client.LogicalSwitchExists should have comment or be unexported (golint)
    • Line 348: warning: exported method Client.ListLogicalSwitchPort should have comment or be unexported (golint)
    • Line 365: warning: exported method Client.LogicalSwitchPortExists should have comment or be unexported (golint)
    • Line 378: warning: exported method Client.ListRemoteLogicalSwitchPortAddress should have comment or be unexported (golint)
    • Line 439: warning: exported method Client.RemoveRouterPort should have comment or be unexported (golint)
    • Line 477: warning: exported type StaticRoute should have comment or be unexported (golint)
    • Line 483: warning: exported method Client.ListStaticRoute should have comment or be unexported (golint)
    • Line 526: warning: exported method Client.GetStaticRouteList should have comment or be unexported (golint)
    • Line 560: warning: exported method Client.UpdateNatRule should have comment or be unexported (golint)
    • Line 569: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 590: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 599: warning: exported method Client.DeleteNatRule should have comment or be unexported (golint)
    • Line 636: warning: exported method Client.DeleteStaticRouteByNextHop should have comment or be unexported (golint)
    • Line 775: warning: exported method Client.GetLogicalSwitchPortAddress should have comment or be unexported (golint)
    • Line 797: warning: exported method Client.GetLogicalSwitchPortDynamicAddress should have comment or be unexported (golint)
    • Line 836: warning: exported method Client.CreatePortGroup should have comment or be unexported (golint)
    • Line 853: warning: exported method Client.DeletePortGroup should have comment or be unexported (golint)
    • Line 871: warning: exported method Client.ListPortGroup should have comment or be unexported (golint)
    • Line 897: warning: exported method Client.CreateAddressSet should have comment or be unexported (golint)
    • Line 910: warning: exported method Client.ListAddressSet should have comment or be unexported (golint)
    • Line 919: warning: exported method Client.DeleteAddressSet should have comment or be unexported (golint)
    • Line 924: warning: exported method Client.CreateIngressACL should have comment or be unexported (golint)
    • Line 947: warning: exported method Client.CreateEgressACL should have comment or be unexported (golint)
    • Line 970: warning: exported method Client.DeleteACL should have comment or be unexported (golint)
    • Line 975: warning: exported method Client.CreateGatewayACL should have comment or be unexported (golint)
    • Line 997: warning: exported method Client.SetPortsToPortGroup should have comment or be unexported (golint)
    • Line 1007: warning: exported method Client.SetAddressesToAddressSet should have comment or be unexported (golint)
    • Line 1107: warning: exported method Client.GetLogicalSwitchPortByLogicalSwitch should have comment or be unexported (golint)
    • Line 1121: warning: exported method Client.CreateLocalnetPort should have comment or be unexported (golint)
    • kube-ovn/pkg/util/pod_exec.go
    • Line 17: warning: exported type ExecOptions should have comment or be unexported (golint)
    • Line 28: warning: exported function ExecuteCommandInContainer should have comment or be unexported (golint)
    • Line 42: warning: exported function ExecuteWithOptions should have comment or be unexported (golint)
    • kube-ovn/pkg/util/validator.go
    • Line 16: warning: exported const V6Multicast should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported function ValidateSubnet should have comment or be unexported (golint)
    • Line 114: warning: exported function ValidatePodNetwork should have comment or be unexported (golint)
    • Line 179: warning: exported function ValidatePodCidr should have comment or be unexported (golint)
    • Line 198: warning: exported function ValidateVlanTag should have comment or be unexported (golint)
    • kube-ovn/pkg/ipam/ip.go
    • Line 10: warning: exported type IP should have comment or be unexported (golint)
    • Line 12: warning: exported type IPRange should have comment or be unexported (golint)
    • Line 17: warning: exported method IP.Equal should have comment or be unexported (golint)
    • Line 21: warning: exported method IP.LessThan should have comment or be unexported (golint)
    • Line 25: warning: exported method IP.GreaterThan should have comment or be unexported (golint)
    • Line 29: warning: exported method IP.Add should have comment or be unexported (golint)
    • Line 33: warning: exported method IPRange.IPExist should have comment or be unexported (golint)
    • Line 38: warning: exported type IPRangeList should have comment or be unexported (golint)
    • Line 40: warning: exported method IPRangeList.Contains should have comment or be unexported (golint)
    • kube-ovn/pkg/speaker/bgpapiutil/attribute.go
    • Line 32: warning: exported function UnmarshalAttribute should have comment or be unexported (golint)
    • Line 81: warning: exported function NewOriginAttributeFromNative should have comment or be unexported (golint)
    • Line 87: warning: exported function NewAsPathAttributeFromNative should have comment or be unexported (golint)
    • Line 100: warning: exported function NewNextHopAttributeFromNative should have comment or be unexported (golint)
    • Line 106: warning: exported function NewMultiExitDiscAttributeFromNative should have comment or be unexported (golint)
    • Line 112: warning: exported function NewLocalPrefAttributeFromNative should have comment or be unexported (golint)
    • Line 118: warning: exported function NewAtomicAggregateAttributeFromNative should have comment or be unexported (golint)
    • Line 122: warning: exported function NewAggregatorAttributeFromNative should have comment or be unexported (golint)
    • Line 129: warning: exported function NewCommunitiesAttributeFromNative should have comment or be unexported (golint)
    • Line 135: warning: exported function NewOriginatorIdAttributeFromNative should have comment or be unexported (golint)
    • Line 141: warning: exported function NewClusterListAttributeFromNative should have comment or be unexported (golint)
    • Line 151: warning: exported function MarshalRD should have comment or be unexported (golint)
    • Line 180: warning: exported function UnmarshalRD should have comment or be unexported (golint)
    • Line 200: warning: exported function NewEthernetSegmentIdentifierFromNative should have comment or be unexported (golint)
    • Line 214: warning: exported function MarshalFlowSpecRules should have comment or be unexported (golint)
    • Line 274: warning: exported function UnmarshalFlowSpecRules should have comment or be unexported (golint)
    • Line 323: warning: exported function MarshalNLRI should have comment or be unexported (golint)
    • Line 446: warning: exported function MarshalNLRIs should have comment or be unexported (golint)
    • Line 454: warning: exported function UnmarshalNLRI should have comment or be unexported (golint)
    • Line 594: warning: exported function UnmarshalNLRIs should have comment or be unexported (golint)
    • Line 606: warning: exported function NewMpReachNLRIAttributeFromNative should have comment or be unexported (golint)
    • Line 623: warning: exported function NewMpUnreachNLRIAttributeFromNative should have comment or be unexported (golint)
    • Line 630: warning: exported function MarshalRT should have comment or be unexported (golint)
    • Line 665: warning: exported function MarshalRTs should have comment or be unexported (golint)
    • Line 673: warning: exported function UnmarshalRT should have comment or be unexported (golint)
    • Line 693: warning: exported function UnmarshalRTs should have comment or be unexported (golint)
    • Line 705: warning: exported function NewExtendedCommunitiesAttributeFromNative should have comment or be unexported (golint)
    • Line 873: warning: exported function NewAs4PathAttributeFromNative should have comment or be unexported (golint)
    • Line 886: warning: exported function NewAs4AggregatorAttributeFromNative should have comment or be unexported (golint)
    • Line 893: warning: exported function NewPmsiTunnelAttributeFromNative should have comment or be unexported (golint)
    • Line 907: warning: exported function NewTunnelEncapAttributeFromNative should have comment or be unexported (golint)
    • Line 946: warning: exported function NewIP6ExtendedCommunitiesAttributeFromNative should have comment or be unexported (golint)
    • Line 978: warning: exported function NewAigpAttributeFromNative should have comment or be unexported (golint)
    • Line 1001: warning: exported function NewLargeCommunitiesAttributeFromNative should have comment or be unexported (golint)
    • Line 1015: warning: exported function NewUnknownAttributeFromNative should have comment or be unexported (golint)
    • Line 1023: warning: exported function MarshalPathAttributes should have comment or be unexported (golint)
    • Line 1095: warning: exported function UnmarshalPathAttributes should have comment or be unexported (golint)
    • kube-ovn/pkg/speaker/bgpapiutil/util.go
    • Line 28: warning: comment on exported type Path should be of the form "Path ..." (with optional leading article) (golint)
    • Line 40: warning: exported type Destination should have comment or be unexported (golint)
    • Line 44: warning: exported method Destination.MarshalJSON should have comment or be unexported (golint)
    • Line 48: warning: exported function NewDestination should have comment or be unexported (golint)
    • Line 68: warning: exported function NewPath should have comment or be unexported (golint)
    • Line 92: warning: exported function GetNativeNlri should have comment or be unexported (golint)
    • Line 99: warning: exported function GetNativePathAttributes should have comment or be unexported (golint)
    • Line 119: warning: exported function ToRouteFamily should have comment or be unexported (golint)
    • Line 123: warning: exported function ToApiFamily should have comment or be unexported (golint)
    • kube-ovn/pkg/util/net.go
    • Line 32: warning: exported function Ip2BigInt should have comment or be unexported (golint)
    • Line 42: warning: exported function BigInt2Ip should have comment or be unexported (golint)
    • Line 51: warning: exported function SubnetNumber should have comment or be unexported (golint)
    • Line 56: warning: exported function SubnetBroadCast should have comment or be unexported (golint)
    • Line 71: warning: exported function FirstSubnetIP should have comment or be unexported (golint)
    • Line 80: warning: exported function LastIP should have comment or be unexported (golint)
    • Line 98: warning: exported function CIDRConflict should have comment or be unexported (golint)
    • Line 117: warning: exported function CIDRContainIP should have comment or be unexported (golint)
    • Line 145: warning: exported function CheckProtocol should have comment or be unexported (golint)
    • Line 177: warning: exported function AddressCount should have comment or be unexported (golint)
    • Line 185: warning: exported function GenerateRandomV4IP should have comment or be unexported (golint)
    • Line 200: warning: exported function IPToString should have comment or be unexported (golint)
    • Line 212: warning: exported function IsValidIP should have comment or be unexported (golint)
    • Line 216: warning: exported function CheckCidrs should have comment or be unexported (golint)
    • Line 225: warning: exported function GetGwByCidr should have comment or be unexported (golint)
    • Line 238: warning: exported function AppendGwByCidr should have comment or be unexported (golint)
    • Line 264: warning: exported function SplitIpsByProtocol should have comment or be unexported (golint)
    • Line 286: warning: exported function GetStringIP should have comment or be unexported (golint)
    • Line 298: warning: exported function GetIpAddrWithMask should have comment or be unexported (golint)
    • Line 312: warning: exported function GetIpWithoutMask should have comment or be unexported (golint)
    • Line 320: warning: exported function SplitStringIP should have comment or be unexported (golint)
    • Line 393: warning: exported function ContainsIPs should have comment or be unexported (golint)
    • Line 410: warning: exported function CountIpNums should have comment or be unexported (golint)
    • Line 426: warning: exported function GatewayContains should have comment or be unexported (golint)
    • kube-ovn/pkg/controller/pod.go
    • Line 664: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 909: 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)
    • kube-ovn/test/e2e/framework/framework.go
    • Line 21: warning: should not use dot imports (golint)
    • Line 27: warning: exported type Framework should have comment or be unexported (golint)
    • Line 35: warning: exported function NewFramework should have comment or be unexported (golint)
    • Line 62: warning: exported method Framework.GetName should have comment or be unexported (golint)
    • Line 66: warning: exported method Framework.WaitSubnetReady should have comment or be unexported (golint)
    • Line 82: warning: exported method Framework.WaitPodReady should have comment or be unexported (golint)
    • Line 107: warning: exported method Framework.WaitPodDeleted should have comment or be unexported (golint)
    • Line 124: warning: exported method Framework.WaitDeploymentReady should have comment or be unexported (golint)
    • Line 160: warning: exported method Framework.WaitStatefulsetReady should have comment or be unexported (golint)
    • Line 196: warning: exported method Framework.ExecToPodThroughAPI should have comment or be unexported (golint)
    • Line 237: warning: exported const Running should have comment (or a comment on this block) or be unexported (golint)
    • kube-ovn/pkg/ovs/ovn-sbctl.go
    • Line 52: warning: exported method Client.DeleteChassis should have comment or be unexported (golint)
    • Line 68: warning: exported method Client.GetChassis should have comment or be unexported (golint)
    • kube-ovn/pkg/webhook/webhook.go
    • Line 26: warning: exported type ValidatingHook should have comment or be unexported (golint)
    • Line 35: warning: exported type WebhookOptions should have comment or be unexported (golint)
    • Line 42: warning: exported function NewValidatingHook should have comment or be unexported (golint)
    • Line 80: warning: exported method ValidatingHook.Handle should have comment or be unexported (golint)
    • Line 113: warning: exported method ValidatingHook.InjectDecoder should have comment or be unexported (golint)
    • Line 118: warning: exported method ValidatingHook.InjectClient should have comment or be unexported (golint)
    • kube-ovn/pkg/daemon/init.go
    • Line 52: warning: exported function InitMirror should have comment or be unexported (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 61: warning: exported function InitVlan should have comment or be unexported (golint)
    • kube-ovn/pkg/controller/init.go
    • Line 18: warning: exported method Controller.InitOVN should have comment or be unexported (golint)
    • Line 47: warning: exported method Controller.InitDefaultVpc should have comment or be unexported (golint)
    • Line 247: warning: exported method Controller.InitIPAM should have comment or be unexported (golint)
    • kube-ovn/pkg/ipam/subnet.go
    • Line 13: warning: exported type Subnet should have comment or be unexported (golint)
    • Line 33: warning: exported function NewSubnet should have comment or be unexported (golint)
    • Line 38: 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 119: warning: exported method Subnet.GetRandomMac should have comment or be unexported (golint)
    • Line 133: warning: exported method Subnet.GetStaticMac should have comment or be unexported (golint)
    • Line 142: warning: exported method Subnet.GetRandomAddress should have comment or be unexported (golint)
    • Line 267: warning: exported method Subnet.GetStaticAddress should have comment or be unexported (golint)
    • Line 316: 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 345: 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 357: warning: exported method Subnet.ReleaseAddress should have comment or be unexported (golint)
    • Line 413: warning: exported method Subnet.ContainAddress should have comment or be unexported (golint)
    • Line 451: warning: exported method Subnet.GetPodAddress should have comment or be unexported (golint)
    • kube-ovn/pkg/speaker/config.go
    • Line 23: warning: exported const DefaultBGPGrpcPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 54: warning: exported function ParseFlags should have comment or be unexported (golint)
    • kube-ovn/pkg/ovs/ovn.go
    • Line 8: warning: exported var ErrNoAddr should have comment or be unexported (golint)
    • Line 29: warning: exported const OvnNbCtl should have comment (or a comment on this block) or be unexported (golint)
    • kube-ovn/pkg/ipam/ipam.go
    • Line 15: warning: error var OutOfRangeError should have name of the form ErrFoo (golint)
    • Line 15: warning: exported var OutOfRangeError should have comment or be unexported (golint)
    • Line 16: warning: error var ConflictError should have name of the form ErrFoo (golint)
    • Line 17: warning: error var NoAvailableError should have name of the form ErrFoo (golint)
    • Line 18: warning: error var InvalidCIDRError should have name of the form ErrFoo (golint)
    • Line 21: warning: exported type IPAM should have comment or be unexported (golint)
    • Line 26: warning: exported type SubnetAddress should have comment or be unexported (golint)
    • Line 32: warning: exported function NewIPAM should have comment or be unexported (golint)
    • Line 39: warning: exported method IPAM.GetRandomAddress should have comment or be unexported (golint)
    • Line 44: 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 51: warning: exported method IPAM.GetStaticAddress should have comment or be unexported (golint)
    • Line 56: 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 110: warning: exported method IPAM.ReleaseAddressByPod should have comment or be unexported (golint)
    • Line 118: warning: exported method IPAM.AddOrUpdateSubnet should have comment or be unexported (golint)
    • Line 127: 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 189: warning: exported method IPAM.DeleteSubnet should have comment or be unexported (golint)
    • Line 196: warning: exported method IPAM.GetPodAddress should have comment or be unexported (golint)
    • Line 215: warning: exported method IPAM.ContainAddress should have comment or be unexported (golint)
    • Line 226: warning: exported method IPAM.IsIPAssignedToPod should have comment or be unexported (golint)
    • Line 232: 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)
    • kube-ovn/pkg/util/slice.go
    • Line 3: warning: exported function DiffStringSlice should have comment or be unexported (golint)
    • Line 64: warning: exported function IsStringIn should have comment or be unexported (golint)
    • Line 73: warning: comment on exported function ContainsString should be of the form "ContainsString ..." (golint)
    • Line 83: warning: exported function RemoveString should have comment or be unexported (golint)
    • kube-ovn/pkg/controller/vpc.go
    • Line 245: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 297: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • kube-ovn/pkg/controller/vpc_nat_gateway.go
    • Line 36: warning: exported const NAT_GW_INIT should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 271: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • kube-ovn/pkg/apis/kubeovn/v1/types.go
    • Line 9: warning: exported const ProtocolIPv4 should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type IP should have comment or be unexported (golint)
    • Line 41: warning: exported type IPSpec should have comment or be unexported (golint)
    • Line 58: warning: exported type IPList should have comment or be unexported (golint)
    • Line 69: warning: exported type Subnet should have comment or be unexported (golint)
    • Line 77: warning: exported type SubnetSpec should have comment or be unexported (golint)
    • Line 107: warning: comment on exported type SubnetCondition should be of the form "SubnetCondition ..." (with optional leading article) (golint)
    • Line 128: warning: exported type SubnetStatus should have comment or be unexported (golint)
    • Line 146: warning: exported type SubnetList should have comment or be unexported (golint)
    • Line 157: warning: exported type Vlan should have comment or be unexported (golint)
    • Line 165: warning: exported type VlanSpec should have comment or be unexported (golint)
    • Line 172: warning: exported type VlanStatus should have comment or be unexported (golint)
    • Line 180: warning: comment on exported type VlanCondition should be of the form "VlanCondition ..." (with optional leading article) (golint)
    • Line 203: warning: exported type VlanList should have comment or be unexported (golint)
    • Line 214: warning: exported type Vpc should have comment or be unexported (golint)
    • Line 222: warning: exported type VpcSpec should have comment or be unexported (golint)
    • Line 227: warning: exported type RoutePolicy should have comment or be unexported (golint)
    • Line 230: warning: exported const PolicySrc should have comment (or a comment on this block) or be unexported (golint)
    • Line 234: warning: exported type StaticRoute should have comment or be unexported (golint)
    • Line 240: warning: exported type VpcStatus should have comment or be unexported (golint)
    • Line 258: warning: comment on exported type VpcCondition should be of the form "VpcCondition ..." (with optional leading article) (golint)
    • Line 281: warning: exported type VpcList should have comment or be unexported (golint)
    • Line 293: warning: exported type VpcNatGateway should have comment or be unexported (golint)
    • Line 300: warning: exported type VpcNatSpec should have comment or be unexported (golint)
    • Line 310: warning: exported type Eip should have comment or be unexported (golint)
    • Line 315: warning: exported type FloutingIpRule should have comment or be unexported (golint)
    • Line 320: warning: exported type SnatRule should have comment or be unexported (golint)
    • Line 325: warning: exported type DnatRule should have comment or be unexported (golint)
    • Line 335: warning: exported type VpcNatGatewayList should have comment or be unexported (golint)
    • kube-ovn/pkg/webhook/static_ip.go
    • Line 28: warning: exported method ValidatingHook.DeploymentCreateHook should have comment or be unexported (golint)
    • Line 42: warning: exported method ValidatingHook.StatefulSetCreateHook should have comment or be unexported (golint)
    • Line 56: warning: exported method ValidatingHook.DaemonSetCreateHook should have comment or be unexported (golint)
    • Line 70: warning: exported method ValidatingHook.PodCreateHook should have comment or be unexported (golint)
    • Line 137: warning: exported method ValidatingHook.DeploymentUpdateHook should have comment or be unexported (golint)
    • Line 156: warning: exported method ValidatingHook.StatefulSetUpdateHook should have comment or be unexported (golint)
    • Line 175: warning: exported method ValidatingHook.DaemonSetUpdateHook should have comment or be unexported (golint)
    • Line 194: warning: exported method ValidatingHook.DeploymentDeleteHook should have comment or be unexported (golint)
    • Line 207: warning: exported method ValidatingHook.StatefulSetDeleteHook should have comment or be unexported (golint)
    • Line 220: warning: exported method ValidatingHook.DaemonSetDeleteHook should have comment or be unexported (golint)
    • Line 233: warning: exported method ValidatingHook.PodDeleteHook should have comment or be unexported (golint)
    • kube-ovn/pkg/util/network_attachment.go
    • Line 63: warning: exported function ParsePodNetworkAnnotation should have comment or be unexported (golint)
    • Line 131: warning: exported function IsOvnNetwork should have comment or be unexported (golint)
    • Line 143: warning: exported function IsDefaultNet should have comment or be unexported (golint)
    • kube-ovn/pkg/apis/kubeovn/v1/condition.go
    • Line 163: warning: comment on exported method VlanStatus.SetVlanError should be of the form "SetVlanError ..." (golint)
    • Line 168: warning: comment on exported method VlanStatus.SetVlanCondition should be of the form "SetVlanCondition ..." (golint)
    • kube-ovn/pkg/controller/subnet.go
    • Line 519: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 632: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 891: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words