Preparing report...

Report for github.com/rtr7/router7

A+    Excellent!    Found 25 issues across 56 files

Tweet

gofmt96%

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!


gocyclo80%

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.

    • router7/integration/netconfig/netconfig_test.go
    • Line 234: warning: cyclomatic complexity 39 of function TestNetconfig() is high (> 15) (gocyclo)
    • Line 483: warning: cyclomatic complexity 20 of function TestNetconfigBridges() is high (> 15) (gocyclo)
    • Line 600: warning: cyclomatic complexity 20 of function TestDHCPv4OldAddressDeconfigured() is high (> 15) (gocyclo)
    • router7/internal/netconfig/netconfig.go
    • Line 301: warning: cyclomatic complexity 27 of function applyInterfaces() is high (> 15) (gocyclo)
    • Line 243: warning: cyclomatic complexity 16 of function applyBridges() is high (> 15) (gocyclo)
    • Line 62: warning: cyclomatic complexity 16 of function applyDhcp4() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • router7/internal/dns/dns.go
    • Line 45: warning: exported type Server should have comment or be unexported (golint)
    • Line 68: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 205: warning: exported method Server.PrometheusHandler should have comment or be unexported (golint)
    • Line 209: warning: exported method Server.DyndnsHandler should have comment or be unexported (golint)
    • Line 245: warning: exported method Server.SetLeases should have comment or be unexported (golint)
    • router7/internal/dhcp4d/dhcp4d.go
    • Line 39: warning: exported type Lease should have comment or be unexported (golint)
    • Line 48: warning: exported method Lease.Expired should have comment or be unexported (golint)
    • Line 52: warning: exported type Handler should have comment or be unexported (golint)
    • Line 71: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 141: warning: exported method Handler.SetHostname should have comment or be unexported (golint)
    • router7/cmd/dhcp4d/mayqtt.go
    • Line 11: warning: exported type PublishRequest should have comment or be unexported (golint)
    • Line 46: warning: exported function MQTT should have comment or be unexported (golint)
    • router7/internal/radvd/radvd.go
    • Line 29: warning: exported type Server should have comment or be unexported (golint)
    • Line 38: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 42: warning: exported method Server.SetPrefixes should have comment or be unexported (golint)
    • Line 60: warning: exported method Server.Serve should have comment or be unexported (golint)
    • Line 108: warning: exported method Server.ListenAndServe should have comment or be unexported (golint)
    • router7/internal/dhcp4/dhcp4.go
    • Line 33: warning: exported type Config should have comment or be unexported (golint)
    • Line 41: warning: exported type Client should have comment or be unexported (golint)
    • Line 160: warning: exported method Client.Release should have comment or be unexported (golint)
    • Line 173: warning: exported method Client.Err should have comment or be unexported (golint)
    • Line 177: warning: exported method Client.Config should have comment or be unexported (golint)
    • router7/internal/dhcp6/dhcp6.go
    • Line 30: warning: exported type ClientConfig should have comment or be unexported (golint)
    • Line 65: warning: exported type Client should have comment or be unexported (golint)
    • Line 85: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 163: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 260: warning: exported method Client.ObtainOrRenew should have comment or be unexported (golint)
    • Line 299: warning: exported method Client.Release should have comment or be unexported (golint)
    • Line 315: warning: exported method Client.Err should have comment or be unexported (golint)
    • Line 319: warning: exported method Client.Config should have comment or be unexported (golint)
    • router7/internal/diag/diag.go
    • Line 20: warning: exported type Node should have comment or be unexported (golint)
    • Line 26: warning: exported type Monitor should have comment or be unexported (golint)
    • Line 30: warning: exported function NewMonitor should have comment or be unexported (golint)
    • Line 34: warning: exported type EvalResult should have comment or be unexported (golint)
    • Line 66: warning: exported method Monitor.Evaluate should have comment or be unexported (golint)
    • router7/internal/multilisten/multilisten.go
    • Line 29: warning: exported type Listener should have comment or be unexported (golint)
    • Line 34: warning: exported type Pool should have comment or be unexported (golint)
    • Line 39: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 45: warning: exported method Pool.ListenAndServe should have comment or be unexported (golint)
    • router7/internal/netconfig/netconfig.go
    • Line 194: warning: exported type InterfaceDetails should have comment or be unexported (golint)
    • Line 201: warning: exported type BridgeDetails should have comment or be unexported (golint)
    • Line 206: warning: exported type InterfaceConfig should have comment or be unexported (golint)
    • Line 822: warning: exported function Apply should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell92%

Misspell Finds commonly misspelled English words