Preparing report...

Report for gitlab.com/mergetb/tech/rtnl

A+    Excellent!    Found 16 issues across 24 files

Tweet

gofmt95%

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.


golint41%

Golint is a linter for Go source code.

    • /gitlab.com/mergetb/tech/rtnl/rtnetlink.go
    • Line 14: warning: exported var Version should have comment or be unexported (golint)
    • Line 16: warning: exported type Context should have comment or be unexported (golint)
    • Line 21: warning: exported method Context.Fd should have comment or be unexported (golint)
    • Line 27: warning: exported method Context.Close should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/rule.go
    • Line 15: warning: exported const FRA_UNSPEC should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported const FR_ACT_UNSPEC should have comment (or a comment on this block) or be unexported (golint)
    • Line 54: warning: exported type Rule should have comment or be unexported (golint)
    • Line 65: warning: exported type Fib should have comment or be unexported (golint)
    • Line 77: warning: exported method Rule.Marshal should have comment or be unexported (golint)
    • Line 146: warning: exported method Rule.Unmarshal should have comment or be unexported (golint)
    • Line 198: warning: exported method Rule.Resolve should have comment or be unexported (golint)
    • Line 200: warning: exported function ReadRules should have comment or be unexported (golint)
    • Line 252: warning: exported method Rule.Add should have comment or be unexported (golint)
    • Line 258: warning: exported method Rule.Present should have comment or be unexported (golint)
    • Line 270: warning: exported method Rule.Del should have comment or be unexported (golint)
    • Line 276: warning: exported method Rule.Absent should have comment or be unexported (golint)
    • Line 288: warning: exported method Rule.Modify should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/tuntap.go
    • Line 11: warning: exported type Tap should have comment or be unexported (golint)
    • Line 14: warning: exported method Tap.Marshal should have comment or be unexported (golint)
    • Line 30: warning: exported method Tap.Unmarshal should have comment or be unexported (golint)
    • Line 48: warning: exported method Tap.Resolve should have comment or be unexported (golint)
    • Line 56: warning: exported type Tun should have comment or be unexported (golint)
    • Line 59: warning: exported method Tun.Marshal should have comment or be unexported (golint)
    • Line 75: warning: exported method Tun.Unmarshal should have comment or be unexported (golint)
    • Line 93: warning: exported method Tun.Resolve should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/wireguard.go
    • Line 9: warning: exported type Wireguard should have comment or be unexported (golint)
    • Line 12: warning: exported method Wireguard.Marshal should have comment or be unexported (golint)
    • Line 28: warning: exported method Wireguard.Unmarshal should have comment or be unexported (golint)
    • Line 46: warning: exported method Wireguard.Resolve should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/addr.go
    • Line 20: warning: comment on exported function NewAddress should be of the form "NewAddress ..." (golint)
    • Line 36: warning: comment on exported method Address.Family should be of the form "Family ..." (golint)
    • Line 56: warning: exported method Address.Prefix should have comment or be unexported (golint)
    • Line 270: warning: exported function ParseAddr should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/bridge.go
    • Line 10: warning: exported const IFLA_BR_UNSPEC should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported const IFLA_BRIDGE_FLAGS should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported const BRIDGE_VLAN_INFO_MASTER should have comment (or a comment on this block) or be unexported (golint)
    • Line 69: warning: exported const BRIDGE_FLAGS_MASTER should have comment (or a comment on this block) or be unexported (golint)
    • Line 73: warning: exported type Bridge should have comment or be unexported (golint)
    • Line 77: warning: exported method Bridge.Marshal should have comment or be unexported (golint)
    • Line 106: warning: exported method Bridge.Unmarshal should have comment or be unexported (golint)
    • Line 130: warning: exported method Bridge.Resolve should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/route.go
    • Line 145: warning: exported function ReadRoutes should have comment or be unexported (golint)
    • Line 197: warning: exported method Route.Add should have comment or be unexported (golint)
    • Line 203: warning: exported method Route.Present should have comment or be unexported (golint)
    • Line 214: warning: exported method Route.Del should have comment or be unexported (golint)
    • Line 219: warning: exported method Route.Absent should have comment or be unexported (golint)
    • Line 230: warning: exported method Route.Modify should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/macvlan.go
    • Line 11: warning: exported const IFLA_MACVLAN_UNSPEC should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type MacvlanMode should have comment or be unexported (golint)
    • Line 23: warning: exported const MACVLAN_MODE_PRIVATE should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported const MACVLAN_MACADDR_ADD should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type Macvlan should have comment or be unexported (golint)
    • Line 42: warning: exported method Macvlan.Marshal should have comment or be unexported (golint)
    • Line 67: warning: exported method Macvlan.Unmarshal should have comment or be unexported (golint)
    • Line 87: warning: exported method Macvlan.Resolve should have comment or be unexported (golint)
    • Line 93: warning: exported function ParseMacvlanMode should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/link.go
    • Line 25: warning: exported const UnspecLinkType should have comment (or a comment on this block) or be unexported (golint)
    • Line 323: warning: exported method Link.SetMtu should have comment or be unexported (golint)
    • Line 364: warning: exported method Link.SetMaster should have comment or be unexported (golint)
    • Line 510: warning: exported function GetLink should have comment or be unexported (golint)
    • Line 521: warning: exported function GetLinkByIndex should have comment or be unexported (golint)
    • Line 577: warning: exported method LinkInfo.Type should have comment or be unexported (golint)
    • Line 659: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 676: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 728: warning: comment on exported method Link.Down should be of the form "Down ..." (golint)
    • Line 746: warning: exported method Link.Promisc should have comment or be unexported (golint)
    • Line 793: warning: exported method Link.SetUntagged should have comment or be unexported (golint)
    • Line 799: warning: exported method Link.SetTagged should have comment or be unexported (golint)
    • Line 805: warning: exported method Link.SetVlan should have comment or be unexported (golint)
    • Line 925: warning: exported method Link.AddAddr should have comment or be unexported (golint)
    • Line 984: warning: exported function ParseLinkType should have comment or be unexported (golint)
    • Line 1013: warning: exported function IfInfomsgBytes should have comment or be unexported (golint)
    • Line 1038: warning: exported method Link.Addrs should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/loopback.go
    • Line 11: warning: exported type Loopback should have comment or be unexported (golint)
    • Line 14: warning: exported method Loopback.Marshal should have comment or be unexported (golint)
    • Line 30: warning: exported method Loopback.Unmarshal should have comment or be unexported (golint)
    • Line 48: warning: exported method Loopback.Resolve should have comment or be unexported (golint)
    • /gitlab.com/mergetb/tech/rtnl/vrf.go
    • Line 9: warning: exported const IFLA_VRF_UNSPEC should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported const IFLA_VRF_PORT_UNSPEC should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type Vrf should have comment or be unexported (golint)
    • Line 22: warning: exported method Vrf.Marshal should have comment or be unexported (golint)
    • Line 46: warning: exported method Vrf.Unmarshal should have comment or be unexported (golint)
    • Line 66: warning: exported method Vrf.Resolve should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!