Preparing report...

Report for github.com/harvester/network-controller-harvester

A    Great!    Found 22 issues across 50 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!


golint56%

Golint is a linter for Go source code.

    • network-controller-harvester/pkg/network/vlan/vlan.go
    • Line 16: warning: exported type Vlan should have comment or be unexported (golint)
    • Line 24: warning: exported const BridgeName should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported method Vlan.Type should have comment or be unexported (golint)
    • Line 31: warning: comment on exported function NewVlan should be of the form "NewVlan ..." (golint)
    • Line 65: warning: exported function GetVlan should have comment or be unexported (golint)
    • Line 80: warning: exported method Vlan.Setup should have comment or be unexported (golint)
    • Line 118: warning: comment on exported method Vlan.Teardown should be of the form "Teardown ..." (golint)
    • Line 167: warning: exported method Vlan.AddLocalArea should have comment or be unexported (golint)
    • Line 174: warning: exported method Vlan.RemoveLocalArea should have comment or be unexported (golint)
    • Line 181: warning: exported method Vlan.Status should have comment or be unexported (golint)
    • Line 293: warning: exported method Vlan.SlaveNICName should have comment or be unexported (golint)
    • network-controller-harvester/pkg/network/monitor/monitor.go
    • Line 17: warning: exported type Monitor should have comment or be unexported (golint)
    • Line 27: warning: exported function NewMonitor should have comment or be unexported (golint)
    • Line 36: warning: exported type Handler should have comment or be unexported (golint)
    • Line 45: warning: exported method Monitor.Start should have comment or be unexported (golint)
    • Line 151: warning: exported method Monitor.AddLink should have comment or be unexported (golint)
    • Line 157: warning: exported method Monitor.DelLink should have comment or be unexported (golint)
    • Line 163: warning: exported method Monitor.EmptyLink should have comment or be unexported (golint)
    • network-controller-harvester/pkg/network/network.go
    • Line 7: warning: comment on exported type Network should be of the form "Network ..." (with optional leading article) (golint)
    • Line 14: warning: exported type IsolatedNetwork should have comment or be unexported (golint)
    • Line 20: warning: exported type Status should have comment or be unexported (golint)
    • Line 25: warning: exported type Condition should have comment or be unexported (golint)
    • network-controller-harvester/pkg/network/iface/bridge.go
    • Line 11: warning: exported type Bridge should have comment or be unexported (golint)
    • Line 17: warning: exported function NewBridge should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method Bridge.SyncIPv4Addr should be of the form "SyncIPv4Addr ..." (golint)
    • Line 80: warning: exported method Bridge.ClearAddr should have comment or be unexported (golint)
    • Line 91: warning: exported method Bridge.ToLink should have comment or be unexported (golint)
    • Line 99: warning: exported method Bridge.Name should have comment or be unexported (golint)
    • Line 103: warning: exported method Bridge.Index should have comment or be unexported (golint)
    • Line 110: warning: exported method Bridge.Type should have comment or be unexported (golint)
    • Line 117: warning: exported method Bridge.LinkAttrs should have comment or be unexported (golint)
    • Line 124: warning: exported method Bridge.Addr should have comment or be unexported (golint)
    • Line 128: warning: exported method Bridge.Routes should have comment or be unexported (golint)
    • Line 132: warning: exported method Bridge.Fetch should have comment or be unexported (golint)
    • network-controller-harvester/pkg/network/iface/link.go
    • Line 19: warning: exported type Link should have comment or be unexported (golint)
    • Line 25: warning: exported function GetLink should have comment or be unexported (golint)
    • Line 78: warning: exported method Link.SetMaster should have comment or be unexported (golint)
    • Line 97: warning: exported method Link.SetNoMaster should have comment or be unexported (golint)
    • Line 178: warning: exported method Link.AddRoutes should have comment or be unexported (golint)
    • Line 200: warning: exported method Link.DeleteRoutes should have comment or be unexported (golint)
    • Line 211: warning: exported method Link.Index should have comment or be unexported (golint)
    • Line 215: warning: exported method Link.Name should have comment or be unexported (golint)
    • Line 219: warning: exported method Link.Type should have comment or be unexported (golint)
    • Line 223: warning: exported method Link.LinkAttrs should have comment or be unexported (golint)
    • Line 227: warning: exported method Link.Addr should have comment or be unexported (golint)
    • Line 231: warning: exported method Link.Routes should have comment or be unexported (golint)
    • Line 235: warning: exported method Link.Fetch should have comment or be unexported (golint)
    • network-controller-harvester/pkg/config/context.go
    • Line 32: warning: exported var AddToScheme should have comment or be unexported (golint)
    • Line 41: warning: exported type RegisterFunc should have comment or be unexported (golint)
    • Line 43: warning: exported type Management should have comment or be unexported (golint)
    • Line 57: warning: exported method Management.Start should have comment or be unexported (golint)
    • Line 61: warning: exported method Management.Register should have comment or be unexported (golint)
    • Line 75: warning: exported method Management.NewRecorder should have comment or be unexported (golint)
    • Line 104: warning: exported function SetupManagement should have comment or be unexported (golint)
    • network-controller-harvester/pkg/controller/common/nodenetwork.go
    • Line 17: warning: exported const Namespace should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported function NewNodeNetworkFromNode should have comment or be unexported (golint)
    • Line 68: warning: exported function CreateNodeNetworkIfNotExist should have comment or be unexported (golint)
    • Line 91: warning: exported function DeleteAllNodeNetwork should have comment or be unexported (golint)
    • Line 108: warning: exported function CreateAllNodeNetworkIfNotExist should have comment or be unexported (golint)
    • network-controller-harvester/pkg/apis/network.harvesterhci.io/v1beta1/nodenetwork.go
    • Line 17: warning: exported type NodeNetwork should have comment or be unexported (golint)
    • Line 25: warning: exported type NodeNetworkSpec should have comment or be unexported (golint)
    • Line 38: warning: comment on exported type NetworkType should be of the form "NetworkType ..." (with optional leading article) (golint)
    • Line 42: warning: exported const NetworkTypeVLAN should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: exported type NodeNetworkStatus should have comment or be unexported (golint)
    • Line 59: warning: exported type PhysicalNic should have comment or be unexported (golint)
    • Line 65: warning: exported type NetworkID should have comment or be unexported (golint)
    • Line 67: warning: exported type LinkStatus should have comment or be unexported (golint)
    • Line 96: warning: exported type Condition should have comment or be unexported (golint)
    • Line 112: warning: exported var NodeNetworkReady should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (signal: killed)


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!