Preparing report...

Report for github.com/skygangsta/go-logger

(v0.0.0-20191013042222-5c20747a6604)

A+    Excellent!    Found 11 issues across 13 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!


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!


golint15%

Golint is a linter for Go source code.

    • json_formatter.go
    • Line 8: warning: exported type JSONFormatter should have comment or be unexported (golint)
    • Line 12: warning: exported function NewJSONFormatter should have comment or be unexported (golint)
    • Line 18: warning: exported method JSONFormatter.Message should have comment or be unexported (golint)
    • Line 18: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • text_formatter.go
    • Line 10: warning: exported type TextFormatter should have comment or be unexported (golint)
    • Line 15: warning: exported var DefaultFormat should have comment or be unexported (golint)
    • Line 18: warning: exported function NewTextFormatter should have comment or be unexported (golint)
    • Line 24: warning: exported function NewTextFormatterWithFormat should have comment or be unexported (golint)
    • Line 31: warning: exported method TextFormatter.SetFormat should have comment or be unexported (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 35: warning: exported method TextFormatter.Message should have comment or be unexported (golint)
    • Line 35: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • util.go
    • Line 25: warning: comment on exported type LogLevel should be of the form "LogLevel ..." (with optional leading article) (golint)
    • Line 43: warning: exported var DefaultWriter should have comment or be unexported (golint)
    • Line 51: warning: comment on exported function ConvertString2Level should be of the form "ConvertString2Level ..." (golint)
    • Line 76: warning: exported function ConvertLevel2String should have comment or be unexported (golint)
    • Line 101: warning: comment on exported function Variable should be of the form "Variable ..." (golint)
    • Line 116: warning: comment on exported function VariableReplaceByConfig should be of the form "VariableReplaceByConfig ..." (golint)
    • Line 135: warning: exported function RemoveEnterAndSpace should have comment or be unexported (golint)
    • Line 143: warning: exported function GetCaller should have comment or be unexported (golint)
    • Line 153: warning: comment on exported function GetPackageName should be of the form "GetPackageName ..." (golint)
    • Line 168: warning: exported function GetFileName should have comment or be unexported (golint)
    • config.go
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 29: warning: exported type Property should have comment or be unexported (golint)
    • Line 35: warning: exported type Logger should have comment or be unexported (golint)
    • Line 47: warning: exported type Format should have comment or be unexported (golint)
    • Line 53: warning: exported type Level should have comment or be unexported (golint)
    • Line 59: warning: exported type Rolling should have comment or be unexported (golint)
    • Line 66: warning: exported type Filter should have comment or be unexported (golint)
    • Line 72: warning: exported function NewConfig should have comment or be unexported (golint)
    • formatter.go
    • Line 3: warning: exported type Formatter should have comment or be unexported (golint)
    • file_logger.go
    • Line 25: warning: exported type FileLogger should have comment or be unexported (golint)
    • Line 34: warning: exported function NewFileLogger should have comment or be unexported (golint)
    • Line 47: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 55: warning: exported function NewFileLoggerWithConfig should have comment or be unexported (golint)
    • Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 97: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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 110: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 157: warning: exported method FileLogger.CheckRollingSize should have comment or be unexported (golint)
    • Line 157: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 177: warning: comment on exported method FileLogger.RollingFile should be of the form "RollingFile ..." (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 285: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • logger.go
    • Line 31: warning: exported function Init should have comment or be unexported (golint)
    • Line 88: warning: exported function GetByPackage should have comment or be unexported (golint)
    • Line 183: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 219: warning: exported function StartRolling should have comment or be unexported (golint)
    • Line 226: warning: exported function StopRolling should have comment or be unexported (golint)
    • Line 231: warning: exported function Initialized should have comment or be unexported (golint)
    • Line 235: warning: exported function Tracef should have comment or be unexported (golint)
    • Line 245: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 255: warning: exported function Infof should have comment or be unexported (golint)
    • Line 265: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 275: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 285: warning: exported function Fatalf should have comment or be unexported (golint)
    • Line 296: warning: exported function Trace should have comment or be unexported (golint)
    • Line 306: warning: exported function Debug should have comment or be unexported (golint)
    • Line 316: warning: exported function Info should have comment or be unexported (golint)
    • Line 326: warning: exported function Warn should have comment or be unexported (golint)
    • Line 336: warning: exported function Error should have comment or be unexported (golint)
    • Line 346: warning: exported function Fatal should have comment or be unexported (golint)
    • logger_writer.go
    • Line 25: warning: exported type LoggerWriter should have comment or be unexported (golint)
    • Line 38: warning: exported function NewLoggerWriter should have comment or be unexported (golint)
    • Line 52: warning: exported method LoggerWriter.NewLogger should have comment or be unexported (golint)
    • Line 52: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 56: warning: exported method LoggerWriter.SetDenyLevel should have comment or be unexported (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 64: warning: exported method LoggerWriter.SetSkipCallerDepth should have comment or be unexported (golint)
    • Line 64: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 68: warning: exported method LoggerWriter.SetWriter should have comment or be unexported (golint)
    • Line 68: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 72: warning: exported method LoggerWriter.SetFormatter should have comment or be unexported (golint)
    • Line 72: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 116: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 146: warning: comment on exported method LoggerWriter.Output should be of the form "Output ..." (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 156: 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 166: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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 175: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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 187: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 194: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 201: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 208: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 214: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 218: warning: comment on exported method LoggerWriter.Tracef should be of the form "Tracef ..." (golint)
    • Line 221: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 225: warning: exported method LoggerWriter.Debugf should have comment or be unexported (golint)
    • Line 225: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 229: warning: exported method LoggerWriter.Infof should have comment or be unexported (golint)
    • Line 229: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 233: warning: exported method LoggerWriter.Warnf should have comment or be unexported (golint)
    • Line 233: 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 LoggerWriter.Errorf 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 241: warning: exported method LoggerWriter.FatalfWithExit should have comment or be unexported (golint)
    • Line 241: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 249: warning: comment on exported method LoggerWriter.Trace should be of the form "Trace ..." (golint)
    • Line 250: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 254: warning: exported method LoggerWriter.Debug should have comment or be unexported (golint)
    • Line 254: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 258: warning: exported method LoggerWriter.Info should have comment or be unexported (golint)
    • Line 258: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 262: warning: exported method LoggerWriter.Warn should have comment or be unexported (golint)
    • Line 262: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 266: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 270: warning: exported method LoggerWriter.FatalWithExit should have comment or be unexported (golint)
    • Line 270: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 282: warning: exported method LoggerWriter.Level should have comment or be unexported (golint)
    • Line 282: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 287: warning: exported method LoggerWriter.SetLevel should have comment or be unexported (golint)
    • Line 287: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 291: warning: exported method LoggerWriter.ShowSQL should have comment or be unexported (golint)
    • Line 291: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 299: warning: exported method LoggerWriter.IsShowSQL should have comment or be unexported (golint)
    • Line 299: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • writer.go
    • Line 17: warning: comment on exported type Writer should be of the form "Writer ..." (with optional leading article) (golint)
    • console_logger.go
    • Line 21: warning: exported type ConsoleLogger should have comment or be unexported (golint)
    • Line 31: warning: exported function DefaultConsoleLogger should have comment or be unexported (golint)
    • Line 38: warning: exported function NewConsoleLogger should have comment or be unexported (golint)
    • Line 49: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 59: warning: comment on exported method ConsoleLogger.Tracef should be of the form "Tracef ..." (golint)
    • Line 60: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 65: warning: exported method ConsoleLogger.Debugf should have comment or be unexported (golint)
    • Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 70: warning: exported method ConsoleLogger.Infof should have comment or be unexported (golint)
    • Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 75: warning: exported method ConsoleLogger.Warnf should have comment or be unexported (golint)
    • Line 75: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 80: warning: exported method ConsoleLogger.Errorf should have comment or be unexported (golint)
    • Line 80: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 85: warning: exported method ConsoleLogger.FatalfWithExit should have comment or be unexported (golint)
    • Line 85: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 94: warning: exported method ConsoleLogger.Trace should have comment or be unexported (golint)
    • Line 94: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 99: warning: exported method ConsoleLogger.Debug should have comment or be unexported (golint)
    • Line 99: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 104: warning: exported method ConsoleLogger.Info should have comment or be unexported (golint)
    • Line 104: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 109: warning: exported method ConsoleLogger.Warn should have comment or be unexported (golint)
    • Line 109: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 114: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 119: warning: exported method ConsoleLogger.FatalWithExit should have comment or be unexported (golint)
    • Line 119: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 128: warning: comment on exported method ConsoleLogger.CheckRollingSize should be of the form "CheckRollingSize ..." (golint)
    • Line 129: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (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!