Preparing report...

Report for github.com/nordix/meridio

A+    Excellent!    Found 33 issues across 59 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!


gocyclo100%

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.

No problems detected. Good job!


golint49%

Golint is a linter for Go source code.

    • meridio/pkg/networking/ifaces.go
    • Line 4: warning: exported const NSE should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: exported type InterfaceType should have comment or be unexported (golint)
    • Line 10: warning: exported type Iface should have comment or be unexported (golint)
    • Line 31: warning: exported type Utils should have comment or be unexported (golint)
    • Line 45: warning: exported type Bridge should have comment or be unexported (golint)
    • Line 51: warning: exported type FWMarkRoute should have comment or be unexported (golint)
    • Line 55: warning: exported type NFQueue should have comment or be unexported (golint)
    • Line 59: warning: exported type SourceBasedRoute should have comment or be unexported (golint)
    • Line 65: warning: exported type InterfaceMonitor should have comment or be unexported (golint)
    • Line 71: warning: exported type InterfaceMonitorSubscriber should have comment or be unexported (golint)
    • meridio/pkg/ipam/client.go
    • Line 12: warning: exported type IpamClient should have comment or be unexported (golint)
    • Line 16: warning: exported method IpamClient.AllocateSubnet should have comment or be unexported (golint)
    • Line 50: warning: exported function NewIpamClient should have comment or be unexported (golint)
    • meridio/pkg/ipam/endpoint.go
    • Line 17: warning: exported type IpamEndpoint should have comment or be unexported (golint)
    • Line 23: warning: exported function NewIpamEndpoint should have comment or be unexported (golint)
    • Line 45: warning: exported method IpamEndpoint.Request should have comment or be unexported (golint)
    • Line 90: warning: exported method IpamEndpoint.Close should have comment or be unexported (golint)
    • meridio/pkg/kernel/bridge.go
    • Line 8: warning: exported type Bridge should have comment or be unexported (golint)
    • Line 41: warning: exported method Bridge.Delete should have comment or be unexported (golint)
    • Line 87: warning: exported method Bridge.UnLinkInterface should have comment or be unexported (golint)
    • Line 99: warning: exported function NewBridge should have comment or be unexported (golint)
    • meridio/pkg/loadbalancer/loadbalancer.go
    • Line 73: warning: comment on exported method LoadBalancer.GetTargets should be of the form "GetTargets ..." (golint)
    • Line 118: warning: exported method LoadBalancer.SetVIPs should have comment or be unexported (golint)
    • Line 148: warning: exported function NewLoadBalancer should have comment or be unexported (golint)
    • meridio/pkg/ipam/service.go
    • Line 17: warning: exported type IpamService should have comment or be unexported (golint)
    • Line 58: warning: comment on exported function NewIpamService should be of the form "NewIpamService ..." (golint)
    • meridio/pkg/kernel/iptables.go
    • Line 10: warning: exported type NFQueue should have comment or be unexported (golint)
    • Line 15: warning: exported method NFQueue.Delete should have comment or be unexported (golint)
    • Line 56: warning: exported function NewNFQueue should have comment or be unexported (golint)
    • meridio/pkg/client/client.go
    • Line 13: warning: exported type SimpleNetworkServiceClient should have comment or be unexported (golint)
    • Line 19: warning: exported method SimpleNetworkServiceClient.Request should have comment or be unexported (golint)
    • Line 36: warning: exported method SimpleNetworkServiceClient.Close should have comment or be unexported (golint)
    • Line 62: warning: comment on exported function NewSimpleNetworkServiceClient should be of the form "NewSimpleNetworkServiceClient ..." (golint)
    • meridio/pkg/proxy/proxy.go
    • Line 83: warning: comment on exported method Proxy.SetIPContext should be of the form "SetIPContext ..." (golint)
    • Line 147: warning: exported method Proxy.SetVIPs should have comment or be unexported (golint)
    • meridio/pkg/client/connection.go
    • Line 7: warning: exported type NSCConnectionFactory should have comment or be unexported (golint)
    • Line 11: warning: exported type NetworkServiceClient should have comment or be unexported (golint)
    • meridio/pkg/ipam/ipam.go
    • Line 11: warning: exported type Ipam should have comment or be unexported (golint)
    • Line 25: warning: exported method Ipam.AllocateSubnet should have comment or be unexported (golint)
    • Line 41: warning: exported method Ipam.ReleaseSubnet should have comment or be unexported (golint)
    • Line 54: warning: exported method Ipam.AllocateIP should have comment or be unexported (golint)
    • Line 72: warning: exported method Ipam.ReleaseIP should have comment or be unexported (golint)
    • Line 85: warning: exported function NewIpam should have comment or be unexported (golint)
    • meridio/pkg/nsp/client.go
    • Line 11: warning: exported type NetworkServicePlateformClient should have comment or be unexported (golint)
    • Line 15: warning: exported method NetworkServicePlateformClient.Register should have comment or be unexported (golint)
    • Line 24: warning: exported method NetworkServicePlateformClient.Unregister should have comment or be unexported (golint)
    • Line 32: warning: exported method NetworkServicePlateformClient.Monitor should have comment or be unexported (golint)
    • Line 36: warning: exported method NetworkServicePlateformClient.GetTargets should have comment or be unexported (golint)
    • Line 57: warning: exported function NewNetworkServicePlateformClient should have comment or be unexported (golint)
    • meridio/pkg/kernel/vip.go
    • Line 5: warning: exported function AddVIP should have comment or be unexported (golint)
    • Line 21: warning: exported function DeleteVIP should have comment or be unexported (golint)
    • meridio/pkg/loadbalancer/target.go
    • Line 5: warning: exported type Target should have comment or be unexported (golint)
    • Line 11: warning: exported method Target.GetIdentifier should have comment or be unexported (golint)
    • Line 15: warning: exported method Target.GetIPs should have comment or be unexported (golint)
    • Line 19: warning: exported method Target.Configure should have comment or be unexported (golint)
    • Line 32: warning: exported method Target.Delete should have comment or be unexported (golint)
    • Line 45: warning: exported function NewTarget should have comment or be unexported (golint)
    • meridio/pkg/nsp/service.go
    • Line 17: warning: exported type NetworkServicePlateformService should have comment or be unexported (golint)
    • Line 64: warning: exported method NetworkServicePlateformService.Register should have comment or be unexported (golint)
    • Line 69: warning: exported method NetworkServicePlateformService.Unregister should have comment or be unexported (golint)
    • Line 74: warning: exported method NetworkServicePlateformService.Monitor should have comment or be unexported (golint)
    • Line 91: warning: exported method NetworkServicePlateformService.GetTargets should have comment or be unexported (golint)
    • meridio/cmd/target/main.go
    • Line 191: warning: exported method SimpleTarget.SetVIPs should have comment or be unexported (golint)
    • Line 228: warning: exported function NewSimpleTarget should have comment or be unexported (golint)
    • meridio/pkg/configuration/watcher.go
    • Line 15: warning: exported type Watcher should have comment or be unexported (golint)
    • Line 23: warning: exported type Config should have comment or be unexported (golint)
    • Line 27: warning: exported method Watcher.Start should have comment or be unexported (golint)
    • Line 76: warning: exported function NewWatcher should have comment or be unexported (golint)
    • meridio/pkg/nsm/interfacename/generator.go
    • Line 26: warning: exported type NameGenerator should have comment or be unexported (golint)
    • Line 30: warning: exported type RandomGenerator should have comment or be unexported (golint)
    • Line 35: warning: exported method RandomGenerator.Generate should have comment or be unexported (golint)
    • meridio/pkg/nsp/endpoint.go
    • Line 12: warning: exported type NSPEndpoint should have comment or be unexported (golint)
    • Line 16: warning: exported function NewNSPEndpoint should have comment or be unexported (golint)
    • Line 23: warning: exported method NSPEndpoint.Request should have comment or be unexported (golint)
    • Line 34: warning: exported method NSPEndpoint.Close should have comment or be unexported (golint)
    • meridio/pkg/kernel/interface.go
    • Line 10: warning: exported type Interface should have comment or be unexported (golint)
    • Line 22: warning: exported method Interface.GetIndex should have comment or be unexported (golint)
    • Line 26: warning: exported method Interface.GetName should have comment or be unexported (golint)
    • Line 34: warning: exported method Interface.GetLocalPrefixes should have comment or be unexported (golint)
    • Line 38: warning: exported method Interface.SetLocalPrefixes should have comment or be unexported (golint)
    • Line 42: warning: exported method Interface.GetNeighborPrefixes should have comment or be unexported (golint)
    • Line 46: warning: exported method Interface.SetNeighborPrefixes should have comment or be unexported (golint)
    • Line 50: warning: exported method Interface.GetGatewayPrefixes should have comment or be unexported (golint)
    • Line 54: warning: exported method Interface.SetGatewayPrefixes should have comment or be unexported (golint)
    • Line 58: warning: exported method Interface.GetInterfaceType should have comment or be unexported (golint)
    • Line 62: warning: exported method Interface.SetInterfaceType should have comment or be unexported (golint)
    • Line 66: warning: exported method Interface.AddLocalPrefix should have comment or be unexported (golint)
    • Line 83: warning: exported method Interface.RemoveLocalPrefix should have comment or be unexported (golint)
    • Line 99: warning: exported method Interface.Equals should have comment or be unexported (golint)
    • Line 103: warning: exported function NewInterface should have comment or be unexported (golint)
    • meridio/pkg/kernel/utils.go
    • Line 8: warning: exported type KernelUtils should have comment or be unexported (golint)
    • Line 11: warning: exported method KernelUtils.NewInterface should have comment or be unexported (golint)
    • Line 15: warning: exported method KernelUtils.NewBridge should have comment or be unexported (golint)
    • Line 19: warning: exported method KernelUtils.NewFWMarkRoute should have comment or be unexported (golint)
    • Line 23: warning: exported method KernelUtils.NewNFQueue should have comment or be unexported (golint)
    • Line 27: warning: exported method KernelUtils.NewSourceBasedRoute should have comment or be unexported (golint)
    • Line 31: warning: exported method KernelUtils.NewInterfaceMonitor should have comment or be unexported (golint)
    • Line 39: warning: exported method KernelUtils.GetIndexFromName should have comment or be unexported (golint)
    • Line 43: warning: exported method KernelUtils.AddVIP should have comment or be unexported (golint)
    • Line 47: warning: exported method KernelUtils.DeleteVIP should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign89%

IneffAssign detects ineffectual assignments in Go code.

    • meridio/pkg/ipam/client.go
    • Line 7: warning: no required module provides package github.com/nordix/meridio/api/ipam; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/nordix/meridio/api/ipam (invalid package name: "") (ineffassign)
    • meridio/pkg/nsp/client.go
    • Line 7: warning: no required module provides package github.com/nordix/meridio/api/nsp; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/nordix/meridio/api/nsp (invalid package name: "") (ineffassign)
    • meridio/pkg/nsp/target.go
    • Line 20: warning: t.Ips undefined (type *target has no field or method Ips) (ineffassign)
    • Line 20: warning: t2.Ips undefined (type *target has no field or method Ips) (ineffassign)
    • Line 23: warning: t.Ips undefined (type *target has no field or method Ips) (ineffassign)
    • Line 23: warning: t2.Ips undefined (type *target has no field or method Ips) (ineffassign)
    • Line 27: warning: t.Ips undefined (type *target has no field or method Ips) (ineffassign)
    • Line 30: warning: t2.Ips undefined (type *target has no field or method Ips) (ineffassign)
    • meridio/cmd/load-balancer/main.go
    • Line 22: warning: no required module provides package github.com/nordix/meridio/api/nsp; to add it: (ineffassign)
    • Line 22: warning: could not import github.com/nordix/meridio/api/nsp (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!