Preparing report...

Report for github.com/ebay/go-ovn

A    Great!    Found 45 issues across 53 files

Tweet

gofmt92%

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!


golint47%

Golint is a linter for Go source code.

    • go-ovn/nat.go
    • Line 70: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/global_common.go
    • Line 67: warning: should omit 2nd value from range; this loop is equivalent to `for uuid := range ...` (golint)
    • Line 102: warning: should omit 2nd value from range; this loop is equivalent to `for uuid := range ...` (golint)
    • go-ovn/meter.go
    • Line 10: warning: exported type Meter should have comment or be unexported (golint)
    • Line 18: warning: exported type MeterBand should have comment or be unexported (golint)
    • Line 56: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/logical_switch_port.go
    • Line 136: warning: don't use underscores in Go names; var port_security should be portSecurity (golint)
    • Line 282: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 439: 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 449: 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)
    • go-ovn/ovnimp.go
    • Line 216: warning: don't use underscores in Go names; method float64_to_int should be float64ToInt (golint)
    • go-ovn/address_set.go
    • Line 31: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 58: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/encap.go
    • Line 53: 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 69: 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)
    • go-ovn/logical_router.go
    • Line 41: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 282: 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 292: 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)
    • go-ovn/logical_router_static_route.go
    • Line 35: warning: don't use underscores in Go names; method parameter ip_prefix should be ipPrefix (golint)
    • Line 35: warning: don't use underscores in Go names; method parameter output_port should be outputPort (golint)
    • Line 35: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (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 217: 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)
    • go-ovn/logical_switch.go
    • Line 257: 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 267: 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 280: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 307: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/chassis_private.go
    • Line 24: warning: comment on exported type ChassisPrivate should be of the form "ChassisPrivate ..." (with optional leading article) (golint)
    • Line 33: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/client.go
    • Line 30: warning: exported type EntityType should have comment or be unexported (golint)
    • Line 33: warning: exported const PORT_GROUP should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 51: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 78: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 80: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 90: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 99: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 101: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 110: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 117: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 124: warning: don't use underscores in Go names; interface method parameter ip_prefix should be ipPrefix (golint)
    • Line 124: warning: don't use underscores in Go names; interface method parameter output_port should be outputPort (golint)
    • Line 124: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 133: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 180: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 184: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 186: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 195: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 202: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 208: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 221: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 222: warning: don't use underscores in Go names; interface method parameter transport_zones should be transportZones (golint)
    • Line 222: warning: don't use underscores in Go names; interface method parameter vtep_lswitches should be vtepLswitches (golint)
    • Line 253: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 255: warning: don't use underscores in Go names; interface method parameter external_ids should be externalIds (golint)
    • Line 330: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 469: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 469: warning: don't use underscores in Go names; method parameter transport_zones should be transportZones (golint)
    • Line 469: warning: don't use underscores in Go names; method parameter vtep_lswitches should be vtepLswitches (golint)
    • Line 477: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 505: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 509: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 573: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 593: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 605: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 617: warning: don't use underscores in Go names; method parameter ip_prefix should be ipPrefix (golint)
    • Line 617: warning: don't use underscores in Go names; method parameter output_port should be outputPort (golint)
    • Line 617: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 637: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 685: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 689: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 709: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 713: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 721: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 725: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 777: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 781: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 797: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 809: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 841: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 845: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/dhcp_options.go
    • Line 47: warning: don't use underscores in Go names; func parameter external_ids should be externalIds (golint)
    • Line 73: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 95: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/logical_router_port.go
    • Line 39: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 152: warning: don't use underscores in Go names; var ipv6_ra_configs should be ipv6RaConfigs (golint)
    • Line 167: warning: don't use underscores in Go names; var gateway_chassis should be gatewayChassis (golint)
    • Line 209: 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 216: 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)
    • go-ovn/acl.go
    • Line 149: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 302: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/acl_test.go
    • Line 502: warning: should omit 2nd value from range; this loop is equivalent to `for j := range ...` (golint)
    • Line 524: warning: should omit 2nd value from range; this loop is equivalent to `for j := range ...` (golint)
    • go-ovn/chassis.go
    • Line 37: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 37: warning: don't use underscores in Go names; method parameter transport_zones should be transportZones (golint)
    • Line 37: warning: don't use underscores in Go names; method parameter vtep_lswitches should be vtepLswitches (golint)
    • Line 48: warning: don't use underscores in Go names; var encap_ids should be encapIds (golint)
    • Line 58: warning: don't use underscores in Go names; var encap_id should be encapID (golint)
    • go-ovn/dhcp_options_test.go
    • Line 45: warning: don't use underscores in Go names; var dhcp_opts should be dhcpOpts (golint)
    • Line 109: warning: don't use underscores in Go names; var dhcp_opts should be dhcpOpts (golint)
    • go-ovn/logical_router_policy.go
    • Line 37: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 278: 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 285: 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)
    • go-ovn/port_group.go
    • Line 34: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 77: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • go-ovn/common.go
    • Line 28: warning: exported const DBNB should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported const TableNBGlobal should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported var NBTablesOrder should have comment or be unexported (golint)
    • Line 82: warning: exported var SBTablesOrder should have comment or be unexported (golint)
    • go-ovn/qos.go
    • Line 56: warning: don't use underscores in Go names; method parameter external_ids should be externalIds (golint)
    • Line 198: 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 205: 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)
    • go-ovn/test_common.go
    • Line 30: warning: exported const OVS_RUNDIR should have comment (or a comment on this block) or be unexported (golint)
    • Line 79: warning: don't use underscores in Go names; var ovn_db should be ovnDb (golint)
    • Line 80: warning: don't use underscores in Go names; var ovn_socket should be ovnSocket (golint)
    • Line 137: warning: don't use underscores in Go names; var ovs_rundir should be ovsRundir (golint)

gocyclo58%

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.

    • go-ovn/logical_switch_test.go
    • Line 37: warning: cyclomatic complexity 22 of function TestLSwitchExtIds() is high (> 15) (gocyclo)
    • Line 133: warning: cyclomatic complexity 16 of function TestLinkSwitchToRouter() is high (> 15) (gocyclo)
    • go-ovn/acl_test.go
    • Line 26: warning: cyclomatic complexity 64 of function TestLogicalSwitchACLs() is high (> 15) (gocyclo)
    • Line 378: warning: cyclomatic complexity 20 of function TestACLs() is high (> 15) (gocyclo)
    • go-ovn/acl.go
    • Line 37: warning: cyclomatic complexity 45 of function (*ovndb).getACLUUIDByRow() is high (> 15) (gocyclo)
    • Line 149: warning: cyclomatic complexity 16 of function (*ovndb).aclAddImp() is high (> 15) (gocyclo)
    • go-ovn/ovnimp.go
    • Line 227: warning: cyclomatic complexity 37 of function (*ovndb).populateCache() is high (> 15) (gocyclo)
    • go-ovn/nat.go
    • Line 151: warning: cyclomatic complexity 19 of function (*ovndb).lrNatDelImp() is high (> 15) (gocyclo)

ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words