Preparing report...

Report for github.com/Sirupsen/logrus

(v1.8.1)

A    Great!    Found 21 issues across 44 files

Tweet

gofmt77%

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!


gocyclo97%

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.

    • text_formatter.go
    • Line 133: warning: cyclomatic complexity 25 of function (*TextFormatter).Format() is high (> 15) (gocyclo)
    • Line 298: warning: cyclomatic complexity 19 of function (*TextFormatter).needsQuoting() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • hooks/syslog/syslog.go
    • Line 20: warning: comment on exported function NewSyslogHook should be of the form "NewSyslogHook ..." (golint)
    • Line 28: warning: exported method SyslogHook.Fire should have comment or be unexported (golint)
    • Line 53: warning: exported method SyslogHook.Levels should have comment or be unexported (golint)
    • buffer_pool.go
    • Line 12: warning: exported type BufferPool should have comment or be unexported (golint)
    • logger.go
    • Line 17: warning: exported type Logger should have comment or be unexported (golint)
    • Line 51: warning: exported type MutexWrap should have comment or be unexported (golint)
    • Line 56: warning: exported method MutexWrap.Lock should have comment or be unexported (golint)
    • Line 62: warning: exported method MutexWrap.Unlock should have comment or be unexported (golint)
    • Line 68: warning: exported method MutexWrap.Disable should have comment or be unexported (golint)
    • Line 72: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 118: warning: comment on exported method Logger.WithFields should be of the form "WithFields ..." (golint)
    • Line 126: warning: comment on exported method Logger.WithError should be of the form "WithError ..." (golint)
    • Line 134: warning: comment on exported method Logger.WithContext should be of the form "WithContext ..." (golint)
    • Line 141: warning: comment on exported method Logger.WithTime should be of the form "WithTime ..." (golint)
    • Line 148: warning: exported method Logger.Logf should have comment or be unexported (golint)
    • Line 156: warning: exported method Logger.Tracef should have comment or be unexported (golint)
    • Line 160: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 164: warning: exported method Logger.Infof should have comment or be unexported (golint)
    • Line 168: warning: exported method Logger.Printf should have comment or be unexported (golint)
    • Line 174: warning: exported method Logger.Warnf should have comment or be unexported (golint)
    • Line 178: warning: exported method Logger.Warningf should have comment or be unexported (golint)
    • Line 182: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 186: warning: exported method Logger.Fatalf should have comment or be unexported (golint)
    • Line 191: warning: exported method Logger.Panicf should have comment or be unexported (golint)
    • Line 195: warning: exported method Logger.Log should have comment or be unexported (golint)
    • Line 203: warning: exported method Logger.LogFn should have comment or be unexported (golint)
    • Line 211: warning: exported method Logger.Trace should have comment or be unexported (golint)
    • Line 215: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 219: warning: exported method Logger.Info should have comment or be unexported (golint)
    • Line 223: warning: exported method Logger.Print should have comment or be unexported (golint)
    • Line 229: warning: exported method Logger.Warn should have comment or be unexported (golint)
    • Line 233: warning: exported method Logger.Warning should have comment or be unexported (golint)
    • Line 241: warning: exported method Logger.Fatal should have comment or be unexported (golint)
    • Line 246: warning: exported method Logger.Panic should have comment or be unexported (golint)
    • Line 250: warning: exported method Logger.TraceFn should have comment or be unexported (golint)
    • Line 254: warning: exported method Logger.DebugFn should have comment or be unexported (golint)
    • Line 258: warning: exported method Logger.InfoFn should have comment or be unexported (golint)
    • Line 262: warning: exported method Logger.PrintFn should have comment or be unexported (golint)
    • Line 268: warning: exported method Logger.WarnFn should have comment or be unexported (golint)
    • Line 272: warning: exported method Logger.WarningFn should have comment or be unexported (golint)
    • Line 276: warning: exported method Logger.ErrorFn should have comment or be unexported (golint)
    • Line 280: warning: exported method Logger.FatalFn should have comment or be unexported (golint)
    • Line 285: warning: exported method Logger.PanicFn should have comment or be unexported (golint)
    • Line 289: warning: exported method Logger.Logln should have comment or be unexported (golint)
    • Line 297: warning: exported method Logger.Traceln should have comment or be unexported (golint)
    • Line 301: warning: exported method Logger.Debugln should have comment or be unexported (golint)
    • Line 305: warning: exported method Logger.Infoln should have comment or be unexported (golint)
    • Line 309: warning: exported method Logger.Println should have comment or be unexported (golint)
    • Line 315: warning: exported method Logger.Warnln should have comment or be unexported (golint)
    • Line 319: warning: exported method Logger.Warningln should have comment or be unexported (golint)
    • Line 323: warning: exported method Logger.Errorln should have comment or be unexported (golint)
    • Line 327: warning: exported method Logger.Fatalln should have comment or be unexported (golint)
    • Line 332: warning: exported method Logger.Panicln should have comment or be unexported (golint)
    • Line 336: warning: exported method Logger.Exit should have comment or be unexported (golint)
    • Line 344: warning: comment on exported method Logger.SetNoLock should be of the form "SetNoLock ..." (golint)
    • Line 391: warning: exported method Logger.SetReportCaller should have comment or be unexported (golint)
    • writer.go
    • Line 23: warning: exported method Entry.Writer should have comment or be unexported (golint)
    • Line 27: warning: exported method Entry.WriterLevel should have comment or be unexported (golint)
    • hooks/test/test.go
    • Line 1: warning: package comment should be of the form "Package test ..." (golint)
    • Line 51: warning: exported method Hook.Fire should have comment or be unexported (golint)
    • Line 58: warning: exported method Hook.Levels should have comment or be unexported (golint)
    • entry.go
    • Line 37: warning: comment on exported var ErrorKey should be of the form "ErrorKey ..." (golint)
    • Line 40: warning: comment on exported type Entry should be of the form "Entry ..." (with optional leading article) (golint)
    • Line 73: warning: exported function NewEntry should have comment or be unexported (golint)
    • Line 81: warning: exported method Entry.Dup should have comment or be unexported (golint)
    • Line 89: warning: comment on exported method Entry.Bytes should be of the form "Bytes ..." (golint)
    • Line 105: warning: comment on exported method Entry.WithError should be of the form "WithError ..." (golint)
    • Line 110: warning: comment on exported method Entry.WithContext should be of the form "WithContext ..." (golint)
    • Line 119: warning: comment on exported method Entry.WithField should be of the form "WithField ..." (golint)
    • Line 124: warning: comment on exported method Entry.WithFields should be of the form "WithFields ..." (golint)
    • Line 153: warning: comment on exported method Entry.WithTime should be of the form "WithTime ..." (golint)
    • Line 215: warning: exported method Entry.HasCaller should have comment or be unexported (golint)
    • Line 291: warning: exported method Entry.Log should have comment or be unexported (golint)
    • Line 297: warning: exported method Entry.Trace should have comment or be unexported (golint)
    • Line 301: warning: exported method Entry.Debug should have comment or be unexported (golint)
    • Line 305: warning: exported method Entry.Print should have comment or be unexported (golint)
    • Line 309: warning: exported method Entry.Info should have comment or be unexported (golint)
    • Line 313: warning: exported method Entry.Warn should have comment or be unexported (golint)
    • Line 317: warning: exported method Entry.Warning should have comment or be unexported (golint)
    • Line 325: warning: exported method Entry.Fatal should have comment or be unexported (golint)
    • Line 330: warning: exported method Entry.Panic should have comment or be unexported (golint)
    • Line 336: warning: exported method Entry.Logf should have comment or be unexported (golint)
    • Line 342: warning: exported method Entry.Tracef should have comment or be unexported (golint)
    • Line 346: warning: exported method Entry.Debugf should have comment or be unexported (golint)
    • Line 350: warning: exported method Entry.Infof should have comment or be unexported (golint)
    • Line 354: warning: exported method Entry.Printf should have comment or be unexported (golint)
    • Line 358: warning: exported method Entry.Warnf should have comment or be unexported (golint)
    • Line 362: warning: exported method Entry.Warningf should have comment or be unexported (golint)
    • Line 366: warning: exported method Entry.Errorf should have comment or be unexported (golint)
    • Line 370: warning: exported method Entry.Fatalf should have comment or be unexported (golint)
    • Line 375: warning: exported method Entry.Panicf should have comment or be unexported (golint)
    • Line 381: warning: exported method Entry.Logln should have comment or be unexported (golint)
    • Line 387: warning: exported method Entry.Traceln should have comment or be unexported (golint)
    • Line 391: warning: exported method Entry.Debugln should have comment or be unexported (golint)
    • Line 395: warning: exported method Entry.Infoln should have comment or be unexported (golint)
    • Line 399: warning: exported method Entry.Println should have comment or be unexported (golint)
    • Line 403: warning: exported method Entry.Warnln should have comment or be unexported (golint)
    • Line 407: warning: exported method Entry.Warningln should have comment or be unexported (golint)
    • Line 411: warning: exported method Entry.Errorln should have comment or be unexported (golint)
    • Line 415: warning: exported method Entry.Fatalln should have comment or be unexported (golint)
    • Line 420: warning: exported method Entry.Panicln should have comment or be unexported (golint)
    • entry_test.go
    • Line 39: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 59: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 63: warning: should not use basic type string as key in context.WithValue (golint)
    • exported.go
    • Line 14: warning: exported function StandardLogger should have comment or be unexported (golint)
    • hooks.go
    • Line 3: warning: comment on exported type Hook should be of the form "Hook ..." (with optional leading article) (golint)
    • Line 13: warning: comment on exported type LevelHooks should be of the form "LevelHooks ..." (with optional leading article) (golint)
    • logrus.go
    • Line 19: 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 59: warning: exported method Level.MarshalText should have comment or be unexported (golint)
    • Line 80: warning: comment on exported var AllLevels should be of the form "AllLevels ..." (golint)
    • internal/testutils/testutils.go
    • Line 10: warning: should not use dot imports (golint)
    • Line 15: warning: exported function LogAndAssertJSON should have comment or be unexported (golint)
    • Line 31: warning: exported function LogAndAssertText 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!