Preparing report...

Report for github.com/Aterz/proxypool

(v1.7.3)

A    Great!    Found 49 issues across 57 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!


gocyclo92%

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.

    • api/router.go
    • Line 26: warning: cyclomatic complexity 18 of function setupRouter() is high (> 15) (gocyclo)

golint15%

Golint is a linter for Go source code.

    • config/config.go
    • Line 17: warning: exported type ConfigOptions should have comment or be unexported (golint)
    • Line 99: warning: comment on exported function ReadFile should be of the form "ReadFile ..." (golint)
    • Line 108: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pkg/getter/web_fanqiangdang.go
    • Line 18: warning: exported type WebFanqiangdang should have comment or be unexported (golint)
    • Line 24: warning: exported function NewWebFanqiangdangGetter should have comment or be unexported (golint)
    • Line 39: warning: exported method WebFanqiangdang.Get should have comment or be unexported (golint)
    • Line 82: warning: exported method WebFanqiangdang.Get2ChanWG should have comment or be unexported (golint)
    • Line 91: warning: exported method WebFanqiangdang.Get2Chan should have comment or be unexported (golint)
    • pkg/getter/web_free_ssr_xyz.go
    • Line 22: warning: exported type WebFreessrXyz should have comment or be unexported (golint)
    • Line 25: warning: exported function NewWebFreessrxyzGetter should have comment or be unexported (golint)
    • Line 29: warning: exported method WebFreessrXyz.Get should have comment or be unexported (golint)
    • Line 35: warning: exported method WebFreessrXyz.Get2ChanWG should have comment or be unexported (golint)
    • Line 44: warning: exported method WebFreessrXyz.Get2Chan should have comment or be unexported (golint)
    • pkg/getter/web_fuzz.go
    • Line 18: warning: comment on exported type WebFuzz should be of the form "WebFuzz ..." (with optional leading article) (golint)
    • Line 23: warning: comment on exported method WebFuzz.Get should be of the form "Get ..." (golint)
    • Line 37: warning: exported method WebFuzz.Get2ChanWG should have comment or be unexported (golint)
    • Line 46: warning: exported method WebFuzz.Get2Chan should have comment or be unexported (golint)
    • Line 54: warning: exported function NewWebFuzzGetter should have comment or be unexported (golint)
    • pkg/healthcheck/util.go
    • Line 44: warning: exported function HTTPGetViaProxy should have comment or be unexported (golint)
    • Line 92: warning: exported function HTTPHeadViaProxy should have comment or be unexported (golint)
    • Line 140: warning: exported function HTTPGetBodyViaProxy should have comment or be unexported (golint)
    • Line 194: warning: exported function HTTPGetBodyForSpeedTest should have comment or be unexported (golint)
    • pkg/healthcheck/vars.go
    • Line 7: warning: exported var DelayTimeout should have comment or be unexported (golint)
    • Line 8: warning: exported var RelayTimeout should have comment or be unexported (golint)
    • Line 9: warning: exported var SpeedTimeout should have comment or be unexported (golint)
    • Line 10: warning: exported var SpeedExist should have comment or be unexported (golint)
    • Line 12: warning: exported var DelayConn should have comment or be unexported (golint)
    • Line 13: warning: exported var SpeedConn should have comment or be unexported (golint)
    • pkg/getter/subscribe.go
    • Line 23: warning: comment on exported method Subscribe.Get should be of the form "Get ..." (golint)
    • Line 45: warning: comment on exported method Subscribe.Get2ChanWG should be of the form "Get2ChanWG ..." (golint)
    • Line 55: warning: exported method Subscribe.Get2Chan should have comment or be unexported (golint)
    • Line 63: warning: exported function NewSubscribe should have comment or be unexported (golint)
    • pkg/getter/web_fuzz_sub.go
    • Line 17: warning: exported type WebFuzzSub should have comment or be unexported (golint)
    • Line 21: warning: exported method WebFuzzSub.Get should have comment or be unexported (golint)
    • Line 44: warning: exported method WebFuzzSub.Get2ChanWG should have comment or be unexported (golint)
    • Line 53: warning: exported method WebFuzzSub.Get2Chan should have comment or be unexported (golint)
    • Line 61: warning: exported function NewWebFuzzSubGetter should have comment or be unexported (golint)
    • pkg/provider/trojansub.go
    • Line 8: warning: exported type TrojanSub should have comment or be unexported (golint)
    • Line 12: warning: exported method TrojanSub.Provide should have comment or be unexported (golint)
    • pkg/provider/vmesssub.go
    • Line 9: warning: exported type VmessSub should have comment or be unexported (golint)
    • Line 13: warning: exported method VmessSub.Provide should have comment or be unexported (golint)
    • pkg/proxy/trojan.go
    • Line 14: warning: exported var ErrorNotTrojanink should have comment or be unexported (golint)
    • Line 21: warning: exported type Trojan should have comment or be unexported (golint)
    • Line 46: warning: exported method Trojan.Identifier should have comment or be unexported (golint)
    • Line 58: warning: exported method Trojan.ToClash should have comment or be unexported (golint)
    • Line 66: warning: exported method Trojan.ToSurge should have comment or be unexported (golint)
    • Line 70: warning: exported method Trojan.Clone should have comment or be unexported (golint)
    • Line 74: warning: comment on exported method Trojan.Link should be of the form "Link ..." (golint)
    • Line 92: warning: exported function ParseTrojanLink should have comment or be unexported (golint)
    • Line 163: warning: exported function GrepTrojanLinkFromString should have comment or be unexported (golint)
    • pkg/provider/ssrsub.go
    • Line 9: warning: exported type SSRSub should have comment or be unexported (golint)
    • Line 13: warning: exported method SSRSub.Provide should have comment or be unexported (golint)
    • pkg/geoIp/geoip.go
    • Line 1: warning: don't use MixedCaps in package name; geoIp should be geoip (golint)
    • Line 15: warning: exported var GeoIpDB should have comment or be unexported (golint)
    • Line 17: warning: exported function InitGeoIpDB should have comment or be unexported (golint)
    • Line 37: warning: comment on exported type GeoIP should be of the form "GeoIP ..." (with optional leading article) (golint)
    • Line 43: warning: exported type CountryEmoji should have comment or be unexported (golint)
    • Line 48: warning: comment on exported function NewGeoIP should be of the form "NewGeoIP ..." (golint)
    • Line 83: warning: comment on exported method GeoIP.Find should be of the form "Find ..." (golint)
    • pkg/healthcheck/httputils.go
    • Line 44: warning: exported function HTTPGetViaProxy should have comment or be unexported (golint)
    • Line 92: warning: exported function HTTPHeadViaProxy should have comment or be unexported (golint)
    • Line 143: warning: exported function HTTPGetBodyViaProxy should have comment or be unexported (golint)
    • Line 197: warning: exported function HTTPGetBodyViaProxyWithTime should have comment or be unexported (golint)
    • Line 251: warning: comment on exported function HTTPGetBodyViaProxyWithTimeNoReturn should be of the form "HTTPGetBodyViaProxyWithTimeNoReturn ..." (golint)
    • pkg/healthcheck/speeduser.go
    • Line 103: warning: receiver name svrs should be consistent with previous receiver name s for Servers (golint)
    • Line 119: warning: receiver name svrs should be consistent with previous receiver name s for Servers (golint)
    • Line 122: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pkg/proxy/proxies.go
    • Line 9: warning: exported type ProxyList should have comment or be unexported (golint)
    • Line 16: warning: exported method ProxyList.TypeLen should have comment or be unexported (golint)
    • Line 39: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 64: warning: exported method ProxyList.Sort should have comment or be unexported (golint)
    • Line 69: warning: exported method ProxyList.NameClear should have comment or be unexported (golint)
    • Line 77: warning: exported method ProxyList.NameAddCounrty should have comment or be unexported (golint)
    • Line 85: warning: exported method ProxyList.NameAddIndex should have comment or be unexported (golint)
    • Line 93: warning: exported method ProxyList.NameReIndex should have comment or be unexported (golint)
    • Line 103: warning: exported method ProxyList.NameAddTG should have comment or be unexported (golint)
    • Line 111: warning: exported method ProxyList.Clone should have comment or be unexported (golint)
    • Line 143: warning: comment on exported method ProxyList.UniqAppendProxyList should be of the form "UniqAppendProxyList ..." (golint)
    • Line 166: warning: comment on exported method ProxyList.UniqAppendProxy should be of the form "UniqAppendProxy ..." (golint)
    • pkg/proxy/geoip.go
    • Line 17: warning: exported function InitGeoIpDB should have comment or be unexported (golint)
    • Line 39: warning: comment on exported type GeoIP should be of the form "GeoIP ..." (with optional leading article) (golint)
    • Line 45: warning: exported type CountryEmoji should have comment or be unexported (golint)
    • Line 50: warning: comment on exported function NewGeoIP should be of the form "NewGeoIP ..." (golint)
    • Line 85: warning: comment on exported method GeoIP.Find should be of the form "Find ..." (golint)
    • pkg/proxy/vmess.go
    • Line 19: warning: exported var ErrorNotVmessLink should have comment or be unexported (golint)
    • Line 23: warning: exported type Vmess should have comment or be unexported (golint)
    • Line 38: warning: exported type HTTPOptions should have comment or be unexported (golint)
    • Line 44: warning: exported type HTTP2Options should have comment or be unexported (golint)
    • Line 53: warning: exported method Vmess.Identifier should have comment or be unexported (golint)
    • Line 65: warning: exported method Vmess.ToClash should have comment or be unexported (golint)
    • Line 73: warning: exported method Vmess.ToSurge should have comment or be unexported (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 96: warning: exported method Vmess.Clone should have comment or be unexported (golint)
    • Line 100: warning: exported method Vmess.Link should have comment or be unexported (golint)
    • Line 143: warning: exported function ParseVmessLink should have comment or be unexported (golint)
    • Line 264: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 346: warning: exported function GrepVmessLinkFromString should have comment or be unexported (golint)
    • internal/cache/cache.go
    • Line 12: warning: exported function GetProxies should have comment or be unexported (golint)
    • Line 20: warning: exported function SetProxies should have comment or be unexported (golint)
    • Line 24: warning: exported function SetString should have comment or be unexported (golint)
    • Line 28: warning: exported function GetString should have comment or be unexported (golint)
    • internal/cron/cron.go
    • Line 15: warning: exported function Cron should have comment or be unexported (golint)
    • Line 60: warning: don't use underscores in Go names; var pl_all should be plAll (golint)
    • log/log.go
    • Line 33: warning: exported function SetLevel should have comment or be unexported (golint)
    • Line 38: warning: exported function Traceln should have comment or be unexported (golint)
    • Line 42: warning: exported function Debugln should have comment or be unexported (golint)
    • Line 46: warning: exported function Infoln should have comment or be unexported (golint)
    • Line 50: warning: exported function Warnln should have comment or be unexported (golint)
    • Line 54: warning: exported function Errorln should have comment or be unexported (golint)
    • Line 58: warning: exported function Fileln should have comment or be unexported (golint)
    • pkg/provider/base.go
    • Line 14: warning: exported type Provider should have comment or be unexported (golint)
    • Line 18: warning: exported type Base should have comment or be unexported (golint)
    • pkg/healthcheck/statistic.go
    • Line 5: warning: comment on exported type Stat should be of the form "Stat ..." (with optional leading article) (golint)
    • Line 16: warning: comment on exported type StatList should be of the form "StatList ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported method Stat.UpdatePSSpeed should be of the form "UpdatePSSpeed ..." (golint)
    • Line 35: warning: comment on exported method Stat.UpdatePSDelay should be of the form "UpdatePSDelay ..." (golint)
    • Line 40: warning: comment on exported method Stat.UpdatePSOutIp should be of the form "UpdatePSOutIp ..." (golint)
    • Line 45: warning: comment on exported method Stat.UpdatePSCount should be of the form "UpdatePSCount ..." (golint)
    • Line 61: warning: comment on exported method StatList.ReqCountThan should be of the form "ReqCountThan ..." (golint)
    • Line 80: warning: comment on exported method StatList.SortProxiesBySpeed should be of the form "SortProxiesBySpeed ..." (golint)
    • pkg/tool/httpclient.go
    • Line 9: warning: exported const UserAgent should have comment or be unexported (golint)
    • Line 11: warning: exported type HttpClient should have comment or be unexported (golint)
    • Line 22: warning: exported function GetHttpClient should have comment or be unexported (golint)
    • Line 27: warning: exported method HttpClient.Get should have comment or be unexported (golint)
    • Line 37: warning: exported method HttpClient.Post should have comment or be unexported (golint)
    • pkg/proxy/shadowsocks.go
    • Line 62: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 68: warning: exported method Shadowsocks.Clone should have comment or be unexported (golint)
    • Line 72: warning: comment on exported method Shadowsocks.Link should be of the form "Link ..." (golint)
    • Line 80: warning: comment on exported function ParseSSLink should be of the form "ParseSSLink ..." (golint)
    • Line 161: warning: comment on exported function GrepSSLinkFromString should be of the form "GrepSSLinkFromString ..." (golint)
    • pkg/proxy/shadowsocksr.go
    • Line 17: warning: exported var ErrorNotSSRLink should have comment or be unexported (golint)
    • Line 25: warning: comment on exported type ShadowsocksR should be of the form "ShadowsocksR ..." (with optional leading article) (golint)
    • Line 36: warning: exported method ShadowsocksR.Identifier should have comment or be unexported (golint)
    • Line 48: warning: exported method ShadowsocksR.ToClash should have comment or be unexported (golint)
    • Line 56: warning: exported method ShadowsocksR.ToSurge should have comment or be unexported (golint)
    • Line 60: warning: exported method ShadowsocksR.Clone should have comment or be unexported (golint)
    • Line 64: warning: comment on exported method ShadowsocksR.Link should be of the form "Link ..." (golint)
    • Line 77: warning: exported function ParseSSRLink should have comment or be unexported (golint)
    • Line 171: warning: exported function GrepSSRLinkFromString should have comment or be unexported (golint)
    • internal/app/getter.go
    • Line 15: warning: exported var Getters should have comment or be unexported (golint)
    • Line 17: warning: exported function InitConfigAndGetters should have comment or be unexported (golint)
    • Line 24: 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)
    • pkg/getter/base.go
    • Line 11: warning: comment on exported type Getter should be of the form "Getter ..." (with optional leading article) (golint)
    • Line 25: warning: exported function Register should have comment or be unexported (golint)
    • Line 29: warning: exported function NewGetter should have comment or be unexported (golint)
    • Line 37: warning: exported function StringArray2ProxyArray should have comment or be unexported (golint)
    • Line 48: warning: exported function ClashProxy2ProxyArray should have comment or be unexported (golint)
    • Line 59: warning: exported function GrepLinksFromString should have comment or be unexported (golint)
    • Line 67: warning: exported function FuzzParseProxyFromString should have comment or be unexported (golint)
    • Line 72: warning: exported var ErrorUrlNotFound should have comment or be unexported (golint)
    • Line 76: warning: exported function AssertTypeStringNotNull should have comment or be unexported (golint)
    • pkg/getter/clash.go
    • Line 16: warning: exported type Clash should have comment or be unexported (golint)
    • Line 24: warning: exported method Clash.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method Clash.Get2Chan should have comment or be unexported (golint)
    • Line 53: warning: exported method Clash.Get2ChanWG should have comment or be unexported (golint)
    • Line 62: warning: exported function NewClashGetter should have comment or be unexported (golint)
    • pkg/getter/tgchannel.go
    • Line 20: warning: exported type TGChannelGetter should have comment or be unexported (golint)
    • Line 28: warning: exported function NewTGChannelGetter should have comment or be unexported (golint)
    • Line 57: warning: exported method TGChannelGetter.Get should have comment or be unexported (golint)
    • Line 109: warning: exported method TGChannelGetter.Get2ChanWG should have comment or be unexported (golint)
    • Line 117: warning: exported method TGChannelGetter.Get2Chan should have comment or be unexported (golint)
    • pkg/tool/cfdecode.go
    • Line 14: warning: comment on exported function GetCFEmailPayload should be of the form "GetCFEmailPayload ..." (golint)
    • Line 25: warning: comment on exported function CFEmailDecode should be of the form "CFEmailDecode ..." (golint)
    • Line 40: warning: comment on exported function CFScriptRedirect should be of the form "CFScriptRedirect ..." (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 72: warning: comment on exported function ScriptGet should be of the form "ScriptGet ..." (golint)
    • Line 87: warning: comment on exported function ScriptReplace should be of the form "ScriptReplace ..." (golint)
    • pkg/provider/sssub.go
    • Line 12: warning: exported type SSSub should have comment or be unexported (golint)
    • Line 26: warning: exported method SSSub.Provide should have comment or be unexported (golint)
    • Line 50: warning: exported type SIP002Sub should have comment or be unexported (golint)
    • Line 54: warning: exported method SIP002Sub.Provide should have comment or be unexported (golint)
    • pkg/proxy/base.go
    • Line 10: warning: comment on exported type Base should be of the form "Base ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported method Base.TypeName should be of the form "TypeName ..." (golint)
    • Line 29: warning: comment on exported method Base.SetName should be of the form "SetName ..." (golint)
    • Line 34: warning: exported method Base.AddToName should have comment or be unexported (golint)
    • Line 38: warning: exported method Base.AddBeforeName should have comment or be unexported (golint)
    • Line 42: warning: comment on exported method Base.SetIP should be of the form "SetIP ..." (golint)
    • Line 47: warning: comment on exported method Base.BaseInfo should be of the form "BaseInfo ..." (golint)
    • Line 52: warning: comment on exported method Base.Clone should be of the form "Clone ..." (golint)
    • Line 58: warning: comment on exported method Base.SetUseable should be of the form "SetUseable ..." (golint)
    • Line 63: warning: comment on exported method Base.SetCountry should be of the form "SetCountry ..." (golint)
    • Line 68: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 84: warning: exported function ParseProxyFromLink should have comment or be unexported (golint)
    • Line 109: warning: exported function ParseProxyFromClashProxy should have comment or be unexported (golint)
    • internal/app/task.go
    • Line 19: warning: exported function CrawlGo should have comment or be unexported (golint)
    • Line 147: warning: comment on exported function SpeedTest should be of the form "SpeedTest ..." (golint)
    • internal/database/proxy.go
    • Line 10: warning: comment on exported type Proxy should be of the form "Proxy ..." (with optional leading article) (golint)
    • Line 20: warning: exported function InitTables should have comment or be unexported (golint)
    • Line 36: warning: exported function SaveProxyList should have comment or be unexported (golint)
    • Line 70: warning: comment on exported function GetAllProxies should be of the form "GetAllProxies ..." (golint)
    • Line 92: warning: comment on exported function ClearOldItems should be of the form "ClearOldItems ..." (golint)
    • api/router.go
    • Line 19: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 295: warning: exported function Run should have comment or be unexported (golint)
    • pkg/tool/base64.go
    • Line 31: warning: exported function Base64EncodeString should have comment or be unexported (golint)
    • Line 38: warning: exported function Base64EncodeBytes should have comment or be unexported (golint)
    • log/level.go
    • Line 7: warning: exported type LogLevel should have comment or be unexported (golint)
    • Line 10: warning: exported const TRACE should have comment (or a comment on this block) or be unexported (golint)
    • pkg/proxy/convert.go
    • Line 9: warning: exported var ErrorTypeCanNotConvert should have comment or be unexported (golint)
    • Line 11: warning: comment on exported function Convert2SSR should be of the form "Convert2SSR ..." (golint)
    • Line 60: warning: exported var SSRCipherList should have comment or be unexported (golint)
    • Line 84: warning: exported var SSCipherList should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!