Preparing report...

Report for github.com/ligato/sfc-controller

A    Great!    Found 36 issues across 89 files

Tweet

gofmt69%

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!


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.


golint74%

Golint is a linter for Go source code.

    • sfc-controller/plugins/k8scrd/ipampool.go
    • Line 29: warning: exported type CRDIpamPoolMgr should have comment or be unexported (golint)
    • Line 33: warning: exported method CRDIpamPoolMgr.Init should have comment or be unexported (golint)
    • Line 36: warning: exported method CRDIpamPoolMgr.AfterInit should have comment or be unexported (golint)
    • Line 54: warning: exported method CRDIpamPoolMgr.CrdToSfcIpamPool should have comment or be unexported (golint)
    • sfc-controller/plugins/controller/networknode.go
    • Line 36: warning: exported type NetworkNodeMgr should have comment or be unexported (golint)
    • Line 40: warning: exported method NetworkNodeMgr.ToArray should have comment or be unexported (golint)
    • Line 48: warning: exported method NetworkNodeMgr.Init should have comment or be unexported (golint)
    • Line 53: warning: exported method NetworkNodeMgr.AfterInit should have comment or be unexported (golint)
    • Line 123: warning: exported method NetworkNodeMgr.FindInterfaceInNode should have comment or be unexported (golint)
    • Line 138: warning: exported method NetworkNodeMgr.FindInterfacesForThisLabelInNode should have comment or be unexported (golint)
    • Line 210: 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 539: 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)
    • sfc-controller/plugins/k8scrd/networknode.go
    • Line 29: warning: exported type CRDNetworkNodeMgr should have comment or be unexported (golint)
    • Line 33: warning: exported method CRDNetworkNodeMgr.Init should have comment or be unexported (golint)
    • Line 36: warning: exported method CRDNetworkNodeMgr.AfterInit should have comment or be unexported (golint)
    • Line 54: warning: exported method CRDNetworkNodeMgr.CrdToSfcNetworkNode should have comment or be unexported (golint)
    • sfc-controller/plugins/k8scrd/networknodeoverlay.go
    • Line 29: warning: exported type CRDNetworkNodeOverlayMgr should have comment or be unexported (golint)
    • Line 33: warning: exported method CRDNetworkNodeOverlayMgr.Init should have comment or be unexported (golint)
    • Line 36: warning: exported method CRDNetworkNodeOverlayMgr.AfterInit should have comment or be unexported (golint)
    • Line 54: warning: exported method CRDNetworkNodeOverlayMgr.CrdToSfcNetworkNodeOverlay should have comment or be unexported (golint)
    • sfc-controller/plugins/controller/interfaces.go
    • Line 25: warning: exported function InitInterfaceStatus should have comment or be unexported (golint)
    • Line 89: warning: exported function PersistInterfaceStatus should have comment or be unexported (golint)
    • Line 105: warning: exported function RetrieveInterfaceStatusFromRamCache should have comment or be unexported (golint)
    • Line 118: warning: exported function RemoveInterfaceStatus should have comment or be unexported (golint)
    • Line 132: warning: exported function UpdateRamCacheAllocatorsForInterfaceStatus should have comment or be unexported (golint)
    • Line 159: warning: comment on exported function InterfaceStatusKeyPrefix should be of the form "InterfaceStatusKeyPrefix ..." (golint)
    • sfc-controller/plugins/controller/networknodeoverlay.go
    • Line 34: warning: exported type NetworkNodeOverlayMgr should have comment or be unexported (golint)
    • Line 40: warning: exported method NetworkNodeOverlayMgr.ToArray should have comment or be unexported (golint)
    • Line 48: warning: exported method NetworkNodeOverlayMgr.Init should have comment or be unexported (golint)
    • Line 53: warning: exported method NetworkNodeOverlayMgr.AfterInit should have comment or be unexported (golint)
    • Line 193: 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)
    • sfc-controller/plugins/controller/networkservice.go
    • Line 37: warning: exported type NetworkServiceMgr should have comment or be unexported (golint)
    • Line 41: warning: exported method NetworkServiceMgr.ToArray should have comment or be unexported (golint)
    • Line 49: warning: exported method NetworkServiceMgr.Init should have comment or be unexported (golint)
    • Line 54: warning: exported method NetworkServiceMgr.AfterInit should have comment or be unexported (golint)
    • Line 143: 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 681: warning: exported method NetworkServiceMgr.FindInterfaceStatus should have comment or be unexported (golint)
    • Line 690: warning: exported method NetworkService.RenderL2BD should have comment or be unexported (golint)
    • Line 737: warning: exported method NetworkService.RenderNetworkPodL2BD should have comment or be unexported (golint)
    • sfc-controller/plugins/controller/networkpodnodemap.go
    • Line 34: warning: exported type NetworkPodToNodeMapMgr should have comment or be unexported (golint)
    • Line 38: warning: exported method NetworkPodToNodeMapMgr.ToArray should have comment or be unexported (golint)
    • Line 46: warning: exported method NetworkPodToNodeMapMgr.Init should have comment or be unexported (golint)
    • Line 51: warning: exported method NetworkPodToNodeMapMgr.AfterInit should have comment or be unexported (golint)
    • Line 288: warning: comment on exported method NetworkPodToNodeMapMgr.ContivKsrNetworkPodToNodePrefix should be of the form "ContivKsrNetworkPodToNodePrefix ..." (golint)
    • Line 389: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • sfc-controller/plugins/k8scrd/networkservice.go
    • Line 29: warning: exported type CRDNetworkServiceMgr should have comment or be unexported (golint)
    • Line 33: warning: exported method CRDNetworkServiceMgr.Init should have comment or be unexported (golint)
    • Line 36: warning: exported method CRDNetworkServiceMgr.AfterInit should have comment or be unexported (golint)
    • Line 54: warning: exported method CRDNetworkServiceMgr.CrdToSfcNetworkService should have comment or be unexported (golint)
    • sfc-controller/plugins/controller/ipampool.go
    • Line 35: warning: exported type IPAMPoolMgr should have comment or be unexported (golint)
    • Line 39: warning: exported method IPAMPoolMgr.ToArray should have comment or be unexported (golint)
    • Line 47: warning: exported method IPAMPoolMgr.Init should have comment or be unexported (golint)
    • Line 52: warning: exported method IPAMPoolMgr.AfterInit should have comment or be unexported (golint)
    • Line 82: warning: receiver name ipamPool should be consistent with previous receiver name ip for IPAMPool (golint)
    • sfc-controller/plugins/controller/model_mgrs.go
    • Line 20: warning: exported const ModelTypeSysParameters should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported function RegisterModelType should have comment or be unexported (golint)
    • Line 61: warning: exported method Plugin.RegisterModelTypeManagers should have comment or be unexported (golint)
    • Line 80: warning: exported const OperationalMsgOpCodeRender should have comment (or a comment on this block) or be unexported (golint)
    • Line 88: warning: exported type OperationalMsg should have comment or be unexported (golint)
    • Line 93: warning: exported var OperationalMsgChannel should have comment or be unexported (golint)
    • Line 169: warning: exported method Plugin.AddOperationMsgToQueue should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell91%

Misspell Finds commonly misspelled English words