Preparing report...

Report for github.com/hunterhug/lizard

B    Not bad!    Found 66 issues across 72 files

Tweet

gofmt72%

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!


gocyclo87%

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.

    • lizard/public/core/parse.go
    • Line 201: warning: cyclomatic complexity 27 of function ParseDetail() is high (> 15) (gocyclo)
    • Line 34: warning: cyclomatic complexity 24 of function ParseList() is high (> 15) (gocyclo)
    • Line 401: warning: cyclomatic complexity 23 of function BigReallyName() is high (> 15) (gocyclo)
    • lizard/public/core/asinurl.go
    • Line 63: warning: cyclomatic complexity 16 of function GetAsinUrls() is high (> 15) (gocyclo)
    • Line 147: warning: cyclomatic complexity 16 of function GetNoneProxyAsinUrls() is high (> 15) (gocyclo)

golint16%

Golint is a linter for Go source code.

    • lizard/public/core/locallistparsetask.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 38: warning: exported function LocalListParseTask should have comment or be unexported (golint)
    • lizard/public/log/appender.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 30: warning: exported var DefaultLowCallpath should have comment or be unexported (golint)
    • Line 34: warning: exported var UseShortFile should have comment or be unexported (golint)
    • Line 36: warning: comment on exported type Appender should be of the form "Appender ..." (with optional leading article) (golint)
    • Line 92: warning: exported type FileAppender should have comment or be unexported (golint)
    • Line 97: warning: exported function NewFileAppender should have comment or be unexported (golint)
    • Line 108: warning: exported method FileAppender.Log should have comment or be unexported (golint)
    • Line 113: warning: exported method FileAppender.Logln should have comment or be unexported (golint)
    • Line 118: warning: exported method FileAppender.Logf should have comment or be unexported (golint)
    • Line 143: warning: exported type DailyAppender should have comment or be unexported (golint)
    • Line 151: warning: exported function NewDailyAppenderEx should have comment or be unexported (golint)
    • Line 177: warning: exported function NewDailyAppender should have comment or be unexported (golint)
    • Line 181: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 193: warning: exported type ConsoleAppender should have comment or be unexported (golint)
    • Line 197: warning: exported function NewConsoleAppender should have comment or be unexported (golint)
    • Line 215: warning: comment on exported type LevelSeparationAppender should be of the form "LevelSeparationAppender ..." (with optional leading article) (golint)
    • Line 221: warning: exported function NewLevelSeparationAppender should have comment or be unexported (golint)
    • Line 228: warning: exported method LevelSeparationAppender.SetLevelAppender should have comment or be unexported (golint)
    • Line 228: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 231: warning: exported method LevelSeparationAppender.Log should have comment or be unexported (golint)
    • Line 231: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 237: warning: exported method LevelSeparationAppender.Logln should have comment or be unexported (golint)
    • Line 237: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 243: warning: exported method LevelSeparationAppender.Logf should have comment or be unexported (golint)
    • Line 243: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 249: warning: exported method LevelSeparationAppender.SetCallpath should have comment or be unexported (golint)
    • Line 249: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 255: warning: exported function NewLevelSeparationDailyAppender should have comment or be unexported (golint)
    • lizard/tool/url/uk_urlmain.go
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 59: warning: comment on exported function Good should be of the form "Good ..." (golint)
    • Line 258: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lizard/public/core/asintask.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 47: warning: exported function AsinGo should have comment or be unexported (golint)
    • lizard/public/log/level.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 22: warning: exported const NOSET should have comment (or a comment on this block) or be unexported (golint)
    • Line 33: warning: exported var LogLevelMap should have comment or be unexported (golint)
    • lizard/public/log/logger.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: comment on exported type Logger should be of the form "Logger ..." (with optional leading article) (golint)
    • Line 30: warning: exported method Logger.SetCallpath should have comment or be unexported (golint)
    • Line 34: warning: exported method Logger.IsAll should have comment or be unexported (golint)
    • Line 35: warning: exported method Logger.IsInfo should have comment or be unexported (golint)
    • Line 36: warning: exported method Logger.IsDebug should have comment or be unexported (golint)
    • Line 37: warning: exported method Logger.IsNotice should have comment or be unexported (golint)
    • Line 38: warning: exported method Logger.IsWarn should have comment or be unexported (golint)
    • Line 39: warning: exported method Logger.IsError should have comment or be unexported (golint)
    • Line 41: warning: exported method Logger.IsLogLevel should have comment or be unexported (golint)
    • Line 72: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 76: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 80: warning: exported method Logger.Log should have comment or be unexported (golint)
    • Line 84: warning: exported method Logger.Logf should have comment or be unexported (golint)
    • Line 88: warning: exported method Logger.Notice should have comment or be unexported (golint)
    • Line 92: warning: exported method Logger.Noticef should have comment or be unexported (golint)
    • Line 96: warning: exported method Logger.Warn should have comment or be unexported (golint)
    • Line 100: warning: exported method Logger.Warnf should have comment or be unexported (golint)
    • Line 108: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 112: warning: comment on exported type LoggerManager should be of the form "LoggerManager ..." (with optional leading article) (golint)
    • Line 119: warning: exported function NewLoggerManager should have comment or be unexported (golint)
    • Line 126: warning: exported function NewLoggerManagerWithConf should have comment or be unexported (golint)
    • Line 139: warning: exported function NewLoggerManagerWithJsconf should have comment or be unexported (golint)
    • Line 147: warning: exported method LoggerManager.UpdateConf should have comment or be unexported (golint)
    • Line 147: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 161: warning: exported method LoggerManager.Logger should have comment or be unexported (golint)
    • Line 161: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 169: warning: exported method LoggerManager.SetLogger should have comment or be unexported (golint)
    • Line 169: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 173: warning: exported method LoggerManager.SetRootAppender should have comment or be unexported (golint)
    • Line 173: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 178: warning: exported method LoggerManager.UseRoot should have comment or be unexported (golint)
    • Line 178: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 192: warning: exported method LoggerManager.SetRootLevel should have comment or be unexported (golint)
    • Line 192: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 197: warning: exported method LoggerManager.SetRootOnlyLevel should have comment or be unexported (golint)
    • Line 197: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • lizard/public/log/mylog.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 21: warning: exported var AmazonAsinLog should have its own declaration (golint)
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • lizard/tool/url/jp_urlmain.go
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 59: warning: comment on exported function Good should be of the form "Good ..." (golint)
    • Line 258: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lizard/public/core/asinurl.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 25: warning: comment on exported function GetAsinUrl should be of the form "GetAsinUrl ..." (golint)
    • Line 62: warning: comment on exported function GetAsinUrls should be of the form "GetAsinUrls ..." (golint)
    • Line 147: warning: exported function GetNoneProxyAsinUrls should have comment or be unexported (golint)
    • lizard/public/core/pool.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 69: warning: exported function AsinPool should have comment or be unexported (golint)
    • Line 79: warning: should omit 2nd value from range; this loop is equivalent to `for ipzonename := range ...` (golint)
    • Line 183: warning: exported function Sentiptoredis should have comment or be unexported (golint)
    • Line 212: warning: exported var IPPOOL should have comment or be unexported (golint)
    • Line 214: warning: exported function GetIPfromglobal should have comment or be unexported (golint)
    • Line 257: warning: exported function IPPool should have comment or be unexported (golint)
    • Line 327: warning: exported function UrlPool should have comment or be unexported (golint)
    • lizard/public/core/server.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 31: warning: exported type AmazonController should have comment or be unexported (golint)
    • Line 273: warning: exported function ServePort should have comment or be unexported (golint)
    • lizard/public/log/logger_conf.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 25: warning: comment on exported type LoggerConf should be of the form "LoggerConf ..." (with optional leading article) (golint)
    • Line 32: warning: exported method LoggerConf.SetAppender should have comment or be unexported (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 36: warning: exported method LoggerConf.SetLevel should have comment or be unexported (golint)
    • Line 36: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 46: warning: exported method LoggerConf.SetOnlyLevels should have comment or be unexported (golint)
    • Line 46: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 56: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 74: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: comment on exported type Tree should be of the form "Tree ..." (with optional leading article) (golint)
    • Line 96: warning: exported function NewTree should have comment or be unexported (golint)
    • Line 120: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 129: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 132: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 137: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 149: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 162: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 175: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 203: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 226: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 244: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 268: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 273: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 284: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 298: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • lizard/public/log/doc.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • lizard/public/core/store.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 27: warning: exported function InsertAsinMysql should have comment or be unexported (golint)
    • Line 76: warning: exported function SetAsinInvalid should have comment or be unexported (golint)
    • Line 88: warning: exported function SetAsinToRightCategory should have comment or be unexported (golint)
    • Line 96: warning: exported function CreateAsinTables should have comment or be unexported (golint)
    • Line 125: warning: exported function CreateAsinRankTables should have comment or be unexported (golint)
    • Line 146: warning: exported function InsertDetailMysql should have comment or be unexported (golint)
    • lizard/public/core/collectasin.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported function CollectAsin should have comment or be unexported (golint)
    • lizard/public/core/othertask.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 25: warning: exported function Montior should have comment or be unexported (golint)
    • Line 65: warning: exported function Clean should have comment or be unexported (golint)
    • lizard/doc.go
    • Line 1: warning: package comment should be of the form "Package lizard ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 27: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 33: warning: exported var Dir should have comment or be unexported (golint)
    • Line 34: warning: exported var CoreDir should have comment or be unexported (golint)
    • Line 35: warning: exported var Local should have comment or be unexported (golint)
    • Line 36: warning: exported var ToolStep should have comment or be unexported (golint)
    • Line 37: warning: exported var ToolProxy should have comment or be unexported (golint)
    • Line 38: warning: exported var ToolNew should have comment or be unexported (golint)
    • Line 39: warning: exported var User should have comment or be unexported (golint)
    • lizard/public/core/dbinit.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 23: warning: exported function InitDB should have comment or be unexported (golint)
    • lizard/public/core/parse.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 28: warning: exported function QueryBytes should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function ParseList should be of the form "ParseList ..." (golint)
    • Line 160: warning: exported function IsRobot should have comment or be unexported (golint)
    • Line 178: warning: exported function Is404 should have comment or be unexported (golint)
    • Line 201: warning: exported function ParseDetail should have comment or be unexported (golint)
    • Line 336: warning: exported function ParseRank should have comment or be unexported (golint)
    • Line 401: warning: exported function BigReallyName should have comment or be unexported (golint)
    • lizard/tool/url/de_urlmain.go
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 59: warning: comment on exported function Good should be of the form "Good ..." (golint)
    • Line 260: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lizard/public/core/download.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 29: warning: exported var Spiders should have comment or be unexported (golint)
    • Line 73: warning: exported function Download should have comment or be unexported (golint)
    • Line 83: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 107: warning: exported function NonProxyDownload should have comment or be unexported (golint)
    • Line 114: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 138: warning: exported function GetIP should have comment or be unexported (golint)
    • lizard/public/log/default.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 47: warning: exported function Init should have comment or be unexported (golint)
    • Line 54: warning: exported function InitConf should have comment or be unexported (golint)
    • Line 58: warning: exported function CurLoggerMananger should have comment or be unexported (golint)
    • Line 62: warning: exported function Get should have comment or be unexported (golint)
    • Line 66: warning: exported function UseRoot should have comment or be unexported (golint)
    • Line 69: warning: exported function SetRootAppender should have comment or be unexported (golint)
    • Line 73: warning: exported function SetRootSeparationAppender should have comment or be unexported (golint)
    • Line 76: warning: exported function SetRootFileAppender should have comment or be unexported (golint)
    • Line 80: warning: exported function SetRootLevel should have comment or be unexported (golint)
    • Line 81: warning: exported function SetRootOnlyLevel should have comment or be unexported (golint)
    • Line 83: warning: exported function Debug should have comment or be unexported (golint)
    • Line 84: warning: exported function Log should have comment or be unexported (golint)
    • Line 85: warning: exported function Notice should have comment or be unexported (golint)
    • Line 86: warning: exported function Warn should have comment or be unexported (golint)
    • Line 87: warning: exported function Error should have comment or be unexported (golint)
    • Line 89: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 90: warning: exported function Logf should have comment or be unexported (golint)
    • Line 91: warning: exported function Noticef should have comment or be unexported (golint)
    • Line 92: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 93: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 95: warning: exported function IsAll should have comment or be unexported (golint)
    • Line 96: warning: exported function IsInfo should have comment or be unexported (golint)
    • Line 97: warning: exported function IsDebug should have comment or be unexported (golint)
    • Line 98: warning: exported function IsNotice should have comment or be unexported (golint)
    • Line 99: warning: exported function IsWarn should have comment or be unexported (golint)
    • Line 100: warning: exported function IsError should have comment or be unexported (golint)
    • lizard/tool/url/usa_urlmain.go
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 73: warning: comment on exported function Good should be of the form "Good ..." (golint)
    • Line 272: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lizard/public/core/config.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 33: warning: exported var Dir should have comment or be unexported (golint)
    • Line 40: warning: exported var AmazonAsinLog should have its own declaration (golint)
    • Line 47: warning: exported var Urlmap should have comment or be unexported (golint)
    • Line 53: warning: exported const USA should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported type IPSecret should have comment or be unexported (golint)
    • Line 68: warning: exported type Config should have comment or be unexported (golint)
    • Line 108: warning: exported function InitConfig should have comment or be unexported (golint)
    • Line 188: warning: exported function OpenMysql should have comment or be unexported (golint)
    • Line 197: warning: exported function MapUrl should have comment or be unexported (golint)
    • Line 234: warning: exported function NewLog should have comment or be unexported (golint)
    • lizard/public/core/listurl.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 26: warning: comment on exported function GetUrl should be of the form "GetUrl ..." (golint)
    • Line 133: warning: exported function GetJapanUrl should have comment or be unexported (golint)
    • Line 279: warning: comment on exported function GetUrls should be of the form "GetUrls ..." (golint)
    • Line 333: warning: comment on exported function GetNoneProxyUrls should be of the form "GetNoneProxyUrls ..." (golint)
    • lizard/public/log/conf.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 25: warning: exported type ConfigLogger should have comment or be unexported (golint)
    • Line 30: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported function LoadConf should be of the form "LoadConf ..." (golint)
    • Line 54: warning: comment on exported method Config.BuildAppenders should be of the form "BuildAppenders ..." (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 77: warning: exported method Config.BuildLoggers should have comment or be unexported (golint)
    • Line 77: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 105: warning: exported method Config.RootLogger should have comment or be unexported (golint)
    • Line 105: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 121: warning: exported method Config.RootsLogger should have comment or be unexported (golint)
    • Line 121: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 156: warning: exported method Config.Verify should have comment or be unexported (golint)
    • Line 156: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • lizard/public/core/listtask.go
    • Line 1: warning: package comment should be of the form "Package core ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 47: warning: exported function ListTask 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!