Preparing report...

Report for github.com/harmonycloud/hcbridge

A+    Excellent!    Found 14 issues across 27 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!


gocyclo77%

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.


golint62%

Golint is a linter for Go source code.

    • hcbridge/cmd/ha/garp.go
    • Line 33: warning: exported function GetNotifyArp should have comment or be unexported (golint)
    • Line 62: warning: exported type NetlinkListener should have comment or be unexported (golint)
    • Line 67: warning: exported function ListenNetlink should have comment or be unexported (golint)
    • Line 95: warning: exported method NetlinkListener.ReadMsgs should have comment or be unexported (golint)
    • Line 115: warning: exported function PrintLinkMsg should have comment or be unexported (golint)
    • hcbridge/pkg/cniextend/cniextend.go
    • Line 13: warning: exported type VlanResult should have comment or be unexported (golint)
    • Line 18: warning: exported method VlanResult.Vlan should have comment or be unexported (golint)
    • Line 22: warning: exported method VlanResult.ConvertToResult should have comment or be unexported (golint)
    • Line 27: warning: exported method VlanResult.Print should have comment or be unexported (golint)
    • Line 36: warning: exported function ExecAdd should have comment or be unexported (golint)
    • Line 61: warning: exported function ExecPluginWithVlanResult should have comment or be unexported (golint)
    • hcbridge/pkg/types/constant.go
    • Line 6: warning: don't use underscores in Go names; const NS_POOL_Key should be NSPOOLKey (golint)
    • Line 8: warning: don't use underscores in Go names; const NS_POOL_Key_Prefix should be NSPOOLKeyPrefix (golint)
    • Line 10: warning: don't use underscores in Go names; const Servicce_Pool_Key should be ServiccePoolKey (golint)
    • Line 12: warning: don't use underscores in Go names; const Servicce_Pool_Key_Prefix should be ServiccePoolKeyPrefix (golint)
    • Line 14: warning: don't use underscores in Go names; const Pod_Key should be PodKey (golint)
    • Line 16: warning: don't use underscores in Go names; const Pod_Key_Prefix should be PodKeyPrefix (golint)
    • Line 28: warning: don't use underscores in Go names; const Service_Key_Prefix should be ServiceKeyPrefix (golint)
    • Line 30: warning: don't use underscores in Go names; const Service_Key should be ServiceKey (golint)
    • hcbridge/pkg/allocator/allocator.go
    • Line 317: warning: exported method IPAllocator.GetIPWithoutSvcPoolPolicy should have comment or be unexported (golint)
    • Line 397: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • hcbridge/pkg/utils/intf.go
    • Line 9: warning: exported function GetNodeMaster should have comment or be unexported (golint)
    • Line 24: warning: exported function GetNodeIP should have comment or be unexported (golint)
    • hcbridge/pkg/utils/network_linux.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 41: warning: exported var DefaultRoutes should have comment or be unexported (golint)
    • Line 59: warning: exported function Min should have comment or be unexported (golint)
    • Line 438: 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!


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!