Preparing report...

Report for github.com/shawn1m/overture

A    Great!    Found 31 issues across 39 files

Tweet

gofmt97%

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!


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!


golint20%

Golint is a linter for Go source code.

    • overture/core/outbound/clients/resolver/base_resolver.go
    • Line 1: warning: package comment should be of the form "Package resolver ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 19: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 24: warning: exported type BaseResolver should have comment or be unexported (golint)
    • Line 28: warning: exported method BaseResolver.Exchange should have comment or be unexported (golint)
    • Line 53: warning: exported method BaseResolver.Init should have comment or be unexported (golint)
    • Line 68: warning: exported function NewResolver should have comment or be unexported (golint)
    • Line 93: warning: exported method BaseResolver.CreateBaseConn should have comment or be unexported (golint)
    • Line 128: warning: exported var InitialCapacity should have comment or be unexported (golint)
    • Line 129: warning: exported var IdleTimeout should have comment or be unexported (golint)
    • Line 130: warning: exported var MaxCapacity should have comment or be unexported (golint)
    • overture/core/finder/full/map.go
    • Line 9: warning: exported type Map should have comment or be unexported (golint)
    • Line 13: warning: exported method Map.Insert should have comment or be unexported (golint)
    • Line 22: warning: exported method Map.Get should have comment or be unexported (golint)
    • Line 26: warning: exported method Map.Name should have comment or be unexported (golint)
    • overture/core/finder/regex/list.go
    • Line 11: warning: exported type List should have comment or be unexported (golint)
    • Line 15: warning: exported method List.Insert should have comment or be unexported (golint)
    • Line 24: warning: exported method List.Get should have comment or be unexported (golint)
    • Line 37: warning: exported method List.Name should have comment or be unexported (golint)
    • overture/core/common/common.go
    • Line 17: warning: exported var ReservedIPNetworkList should have comment or be unexported (golint)
    • Line 19: warning: exported function IsDomainMatchRule should have comment or be unexported (golint)
    • Line 27: warning: exported function HasAnswer should have comment or be unexported (golint)
    • Line 29: warning: exported function HasSubDomain should have comment or be unexported (golint)
    • Line 46: warning: exported function FindRecordByType should have comment or be unexported (golint)
    • Line 60: warning: exported function SetMinimumTTL should have comment or be unexported (golint)
    • Line 71: warning: exported function SetTTLByMap should have comment or be unexported (golint)
    • overture/core/matcher/final/default.go
    • Line 9: warning: exported type Default should have comment or be unexported (golint)
    • Line 12: warning: exported method Default.Insert should have comment or be unexported (golint)
    • Line 16: warning: exported method Default.Has should have comment or be unexported (golint)
    • Line 20: warning: exported method Default.Name should have comment or be unexported (golint)
    • overture/core/outbound/clients/cache.go
    • Line 7: warning: package comment should be of the form "Package clients ..." (golint)
    • Line 17: warning: exported type CacheClient should have comment or be unexported (golint)
    • Line 26: warning: exported function NewCacheClient should have comment or be unexported (golint)
    • Line 30: warning: exported method CacheClient.Exchange should have comment or be unexported (golint)
    • overture/core/inbound/server.go
    • Line 28: warning: exported type Server should have comment or be unexported (golint)
    • Line 39: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 52: warning: exported method Server.ServeDNSHttp should have comment or be unexported (golint)
    • Line 100: warning: exported method Server.DumpCache should have comment or be unexported (golint)
    • Line 159: warning: exported method Server.Run should have comment or be unexported (golint)
    • Line 225: warning: exported method Server.Stop should have comment or be unexported (golint)
    • Line 229: warning: exported method Server.ServeDNS should have comment or be unexported (golint)
    • overture/core/common/edns.go
    • Line 9: warning: exported type EDNSClientSubnetType should have comment or be unexported (golint)
    • Line 15: warning: exported function SetEDNSClientSubnet should have comment or be unexported (golint)
    • Line 69: warning: exported function IsEDNSClientSubnet should have comment or be unexported (golint)
    • Line 79: warning: exported function GetEDNSClientSubnetIP should have comment or be unexported (golint)
    • overture/core/outbound/clients/resolver/tcp_resolver.go
    • Line 11: warning: exported type TCPResolver should have comment or be unexported (golint)
    • Line 16: warning: exported method TCPResolver.Exchange should have comment or be unexported (golint)
    • Line 19: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 24: warning: exported method TCPResolver.Init should have comment or be unexported (golint)
    • overture/core/outbound/clients/resolver/tcptls_resolver.go
    • Line 12: warning: exported type TCPTLSResolver should have comment or be unexported (golint)
    • Line 17: warning: exported method TCPTLSResolver.Exchange should have comment or be unexported (golint)
    • Line 20: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 49: warning: exported method TCPTLSResolver.Init should have comment or be unexported (golint)
    • overture/core/matcher/full/map.go
    • Line 9: warning: exported type Map should have comment or be unexported (golint)
    • Line 13: warning: exported method Map.Insert should have comment or be unexported (golint)
    • Line 18: warning: exported method Map.Has should have comment or be unexported (golint)
    • Line 25: warning: exported method Map.Name should have comment or be unexported (golint)
    • overture/core/outbound/clients/remote_bundle.go
    • Line 18: warning: exported type RemoteClientBundle should have comment or be unexported (golint)
    • Line 35: warning: exported function NewClientBundle should have comment or be unexported (golint)
    • Line 46: warning: exported method RemoteClientBundle.Exchange should have comment or be unexported (golint)
    • Line 84: warning: exported method RemoteClientBundle.ExchangeFromCache should have comment or be unexported (golint)
    • Line 94: warning: exported method RemoteClientBundle.CacheResultIfNeeded should have comment or be unexported (golint)
    • Line 100: warning: exported method RemoteClientBundle.IsType should have comment or be unexported (golint)
    • Line 104: warning: exported method RemoteClientBundle.GetFirstQuestionDomain should have comment or be unexported (golint)
    • Line 108: warning: exported method RemoteClientBundle.GetResponseMessage should have comment or be unexported (golint)
    • overture/core/outbound/dispatcher.go
    • Line 17: warning: exported type Dispatcher should have comment or be unexported (golint)
    • Line 48: warning: exported method Dispatcher.Init should have comment or be unexported (golint)
    • Line 53: warning: exported method Dispatcher.Exchange should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • overture/core/outbound/clients/local.go
    • Line 7: warning: package comment should be of the form "Package clients ..." (golint)
    • Line 21: warning: exported type LocalClient should have comment or be unexported (golint)
    • Line 32: warning: exported function NewLocalClient should have comment or be unexported (golint)
    • Line 38: warning: exported method LocalClient.Exchange should have comment or be unexported (golint)
    • overture/core/outbound/clients/remote.go
    • Line 7: warning: package comment should be of the form "Package clients ..." (golint)
    • Line 20: warning: exported type RemoteClient should have comment or be unexported (golint)
    • Line 32: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 60: warning: exported method RemoteClient.ExchangeFromCache should have comment or be unexported (golint)
    • Line 69: warning: exported method RemoteClient.Exchange should have comment or be unexported (golint)
    • overture/core/matcher/regex/list.go
    • Line 11: warning: exported type List should have comment or be unexported (golint)
    • Line 15: warning: exported method List.Insert should have comment or be unexported (golint)
    • Line 20: warning: exported method List.Has should have comment or be unexported (golint)
    • Line 29: warning: exported method List.Name should have comment or be unexported (golint)
    • overture/core/matcher/mix/list.go
    • Line 15: warning: exported type Data should have comment or be unexported (golint)
    • Line 20: warning: exported type List should have comment or be unexported (golint)
    • Line 24: warning: exported method List.Insert should have comment or be unexported (golint)
    • Line 45: warning: exported method List.Has should have comment or be unexported (golint)
    • Line 74: warning: exported method List.Name should have comment or be unexported (golint)
    • overture/core/cache/cache.go
    • Line 88: warning: exported method Cache.Capacity should have comment or be unexported (golint)
    • Line 90: warning: exported method Cache.Remove should have comment or be unexported (golint)
    • Line 135: warning: exported method Cache.InsertMessageToRedis should have comment or be unexported (golint)
    • Line 149: warning: exported method Cache.InsertMessageToLocal should have comment or be unexported (golint)
    • Line 180: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 185: warning: exported method Cache.SearchFromRedis should have comment or be unexported (golint)
    • Line 200: warning: comment on exported method Cache.SearchFromLocal should be of the form "SearchFromLocal ..." (golint)
    • overture/core/control.go
    • Line 24: warning: comment on exported function InitServer should be of the form "InitServer ..." (golint)
    • Line 30: warning: exported function Start should have comment or be unexported (golint)
    • overture/core/matcher/full/list.go
    • Line 9: warning: exported type List should have comment or be unexported (golint)
    • Line 13: warning: exported method List.Insert should have comment or be unexported (golint)
    • Line 18: warning: exported method List.Has should have comment or be unexported (golint)
    • Line 27: warning: exported method List.Name should have comment or be unexported (golint)
    • overture/core/common/ipset.go
    • Line 25: warning: exported type IPSet should have comment or be unexported (golint)
    • Line 43: warning: exported method IPSet.Contains should have comment or be unexported (golint)
    • Line 115: warning: exported function NewIPSet should have comment or be unexported (golint)
    • overture/core/matcher/suffix/tree.go
    • Line 14: warning: exported type Domain should have comment or be unexported (golint)
    • Line 16: warning: exported type Tree should have comment or be unexported (golint)
    • Line 22: warning: exported method Tree.Name should have comment or be unexported (golint)
    • Line 31: 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 39: 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 44: warning: exported function DefaultDomainTree should have comment or be unexported (golint)
    • Line 48: warning: exported function NewDomainTree should have comment or be unexported (golint)
    • Line 65: warning: exported method Tree.Has should have comment or be unexported (golint)
    • Line 89: warning: exported method Tree.Insert should have comment or be unexported (golint)
    • overture/core/config/config.go
    • Line 33: warning: exported type Config should have comment or be unexported (golint)
    • Line 75: warning: comment on exported function NewConfig should be of the form "NewConfig ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)