Preparing report...

Report for github.com/mylxsw/asteria

A    Great!    Found 21 issues across 37 files

Tweet

gofmt83%

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!


golint56%

Golint is a linter for Go source code.

    • asteria/formatter/json_time.go
    • Line 13: warning: comment on exported function NewJSONWithTimeFormatter should be of the form "NewJSONWithTimeFormatter ..." (golint)
    • Line 18: warning: comment on exported method JSONWithTimeFormatter.Format should be of the form "Format ..." (golint)
    • asteria/event/event.go
    • Line 12: warning: exported type Fields should have comment or be unexported (golint)
    • Line 17: warning: exported type Event should have comment or be unexported (golint)
    • Line 30: warning: exported method Fields.ToMap should have comment or be unexported (golint)
    • asteria/color/color.go
    • Line 11: warning: exported const Black should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported const LightGrey should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported function BackgroundFunc should have comment or be unexported (golint)
    • asteria/log/module.go
    • Line 16: warning: exported type Filter should have comment or be unexported (golint)
    • Line 17: warning: exported type FilterChain should have comment or be unexported (golint)
    • Line 117: warning: exported method AsteriaLogger.DebugEnabled should have comment or be unexported (golint)
    • Line 121: warning: exported method AsteriaLogger.InfoEnabled should have comment or be unexported (golint)
    • Line 125: warning: exported method AsteriaLogger.NoticeEnabled should have comment or be unexported (golint)
    • Line 129: warning: exported method AsteriaLogger.WarningEnabled should have comment or be unexported (golint)
    • Line 133: warning: exported method AsteriaLogger.ErrorEnabled should have comment or be unexported (golint)
    • Line 137: warning: exported method AsteriaLogger.CriticalEnabled should have comment or be unexported (golint)
    • Line 141: warning: exported method AsteriaLogger.AlertEnabled should have comment or be unexported (golint)
    • Line 145: warning: exported method AsteriaLogger.EmergencyEnabled should have comment or be unexported (golint)
    • Line 338: warning: exported method AsteriaLogger.Output should have comment or be unexported (golint)
    • Line 463: warning: exported method AsteriaLogger.With should have comment or be unexported (golint)
    • Line 469: warning: exported method AsteriaLogger.Emergency should have comment or be unexported (golint)
    • Line 473: warning: exported method AsteriaLogger.Alert should have comment or be unexported (golint)
    • Line 477: warning: exported method AsteriaLogger.Critical should have comment or be unexported (golint)
    • Line 485: warning: exported method AsteriaLogger.Warning should have comment or be unexported (golint)
    • Line 489: warning: exported method AsteriaLogger.Notice should have comment or be unexported (golint)
    • Line 493: warning: exported method AsteriaLogger.Info should have comment or be unexported (golint)
    • Line 497: warning: exported method AsteriaLogger.Debug should have comment or be unexported (golint)
    • Line 501: warning: exported method AsteriaLogger.Emergencyf should have comment or be unexported (golint)
    • Line 505: warning: exported method AsteriaLogger.Alertf should have comment or be unexported (golint)
    • Line 509: warning: exported method AsteriaLogger.Criticalf should have comment or be unexported (golint)
    • Line 513: warning: exported method AsteriaLogger.Errorf should have comment or be unexported (golint)
    • Line 517: warning: exported method AsteriaLogger.Warningf should have comment or be unexported (golint)
    • Line 521: warning: exported method AsteriaLogger.Noticef should have comment or be unexported (golint)
    • Line 525: warning: exported method AsteriaLogger.Infof should have comment or be unexported (golint)
    • Line 529: warning: exported method AsteriaLogger.Debugf should have comment or be unexported (golint)
    • Line 533: warning: exported method AsteriaLogger.Print should have comment or be unexported (golint)
    • asteria/log/log.go
    • Line 15: warning: exported type Fields should have comment or be unexported (golint)
    • Line 47: warning: comment on exported function SetLevel should be of the form "SetLevel ..." (golint)
    • Line 52: warning: comment on exported function SetFormatter should be of the form "SetFormatter ..." (golint)
    • Line 57: warning: comment on exported function SetWriter should be of the form "SetWriter ..." (golint)
    • Line 62: warning: exported function WithFields should have comment or be unexported (golint)
    • Line 66: warning: exported function With should have comment or be unexported (golint)
    • Line 70: warning: exported function Emergency should have comment or be unexported (golint)
    • Line 74: warning: exported function Alert should have comment or be unexported (golint)
    • Line 78: warning: exported function Critical should have comment or be unexported (golint)
    • Line 82: warning: exported function Error should have comment or be unexported (golint)
    • Line 86: warning: exported function Warning should have comment or be unexported (golint)
    • Line 90: warning: exported function Notice should have comment or be unexported (golint)
    • Line 94: warning: exported function Info should have comment or be unexported (golint)
    • Line 98: warning: exported function Debug should have comment or be unexported (golint)
    • Line 102: warning: exported function Emergencyf should have comment or be unexported (golint)
    • Line 106: warning: exported function Alertf should have comment or be unexported (golint)
    • Line 110: warning: exported function Criticalf should have comment or be unexported (golint)
    • Line 114: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 118: warning: exported function Warningf should have comment or be unexported (golint)
    • Line 122: warning: exported function Noticef should have comment or be unexported (golint)
    • Line 126: warning: exported function Infof should have comment or be unexported (golint)
    • Line 130: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 134: warning: exported function DebugEnabled should have comment or be unexported (golint)
    • Line 138: warning: exported function InfoEnabled should have comment or be unexported (golint)
    • Line 142: warning: exported function NoticeEnabled should have comment or be unexported (golint)
    • Line 146: warning: exported function WarningEnabled should have comment or be unexported (golint)
    • Line 150: warning: exported function ErrorEnabled should have comment or be unexported (golint)
    • Line 154: warning: exported function AlertEnabled should have comment or be unexported (golint)
    • Line 158: warning: exported function CriticalEnabled should have comment or be unexported (golint)
    • Line 162: warning: exported function EmergencyEnabled should have comment or be unexported (golint)
    • asteria/writer/syslog.go
    • Line 77: warning: exported method SyslogWriter.ReOpen should have comment or be unexported (golint)
    • Line 81: warning: exported method SyslogWriter.Close should have comment or be unexported (golint)
    • asteria/writer/file.go
    • Line 87: warning: exported method FileWriter.GetFilename should have comment or be unexported (golint)
    • Line 91: warning: exported method FileWriter.GetFileStat should have comment or be unexported (golint)
    • Line 98: warning: exported type RotatingFileFn should have comment or be unexported (golint)
    • Line 100: warning: exported type RotatingFileWriter should have comment or be unexported (golint)
    • Line 109: warning: exported function NewDefaultRotatingFileWriter should have comment or be unexported (golint)
    • Line 113: warning: exported function NewRotatingFileWriter should have comment or be unexported (golint)
    • Line 139: warning: exported method RotatingFileWriter.GC should have comment or be unexported (golint)
    • Line 159: warning: exported method RotatingFileWriter.GetOpenedFiles should have comment or be unexported (golint)
    • Line 164: warning: should omit 2nd value from range; this loop is equivalent to `for filename := range ...` (golint)
    • Line 184: warning: exported method RotatingFileWriter.ReOpen should have comment or be unexported (golint)
    • Line 194: warning: exported method RotatingFileWriter.Close should have comment or be unexported (golint)
    • asteria/level/level.go
    • Line 7: warning: exported type Level should have comment or be unexported (golint)
    • Line 21: warning: exported method Level.GetLevelNameAbbreviation should have comment or be unexported (golint)
    • Line 44: warning: exported method Level.GetLevelName should have comment or be unexported (golint)
    • asteria/formatter/default.go
    • Line 27: warning: comment on exported function NewDefaultCleanFormatter should be of the form "NewDefaultCleanFormatter ..." (golint)
    • Line 32: warning: comment on exported method DefaultFormatter.Format should be of the form "Format ..." (golint)
    • asteria/writer/stack.go
    • Line 7: warning: exported type StackMatchFn should have comment or be unexported (golint)
    • Line 18: warning: exported type StackWriter should have comment or be unexported (golint)
    • Line 67: warning: exported method StackWriter.ReOpen should have comment or be unexported (golint)
    • Line 77: warning: exported method StackWriter.Close should have comment or be unexported (golint)
    • asteria/writer/stream.go
    • Line 11: warning: exported type StreamWriter should have comment or be unexported (golint)
    • Line 15: warning: exported function NewStreamWriter should have comment or be unexported (golint)
    • Line 19: warning: exported function NewStdoutWriter should have comment or be unexported (golint)
    • Line 28: warning: exported method StreamWriter.ReOpen should have comment or be unexported (golint)
    • Line 32: warning: exported method StreamWriter.Close should have comment or be unexported (golint)
    • asteria/log/context.go
    • Line 9: warning: exported type ContextLogger should have comment or be unexported (golint)
    • Line 14: warning: exported method ContextLogger.DebugEnabled should have comment or be unexported (golint)
    • Line 18: warning: exported method ContextLogger.InfoEnabled should have comment or be unexported (golint)
    • Line 22: warning: exported method ContextLogger.NoticeEnabled should have comment or be unexported (golint)
    • Line 26: warning: exported method ContextLogger.WarningEnabled should have comment or be unexported (golint)
    • Line 30: warning: exported method ContextLogger.ErrorEnabled should have comment or be unexported (golint)
    • Line 34: warning: exported method ContextLogger.CriticalEnabled should have comment or be unexported (golint)
    • Line 38: warning: exported method ContextLogger.AlertEnabled should have comment or be unexported (golint)
    • Line 42: warning: exported method ContextLogger.EmergencyEnabled should have comment or be unexported (golint)
    • Line 46: warning: exported method ContextLogger.With should have comment or be unexported (golint)
    • Line 68: warning: exported method ContextLogger.Emergency should have comment or be unexported (golint)
    • Line 72: warning: exported method ContextLogger.Alert should have comment or be unexported (golint)
    • Line 76: warning: exported method ContextLogger.Critical should have comment or be unexported (golint)
    • Line 84: warning: exported method ContextLogger.Warning should have comment or be unexported (golint)
    • Line 88: warning: exported method ContextLogger.Notice should have comment or be unexported (golint)
    • Line 92: warning: exported method ContextLogger.Info should have comment or be unexported (golint)
    • Line 96: warning: exported method ContextLogger.Debug should have comment or be unexported (golint)
    • Line 100: warning: exported method ContextLogger.Emergencyf should have comment or be unexported (golint)
    • Line 104: warning: exported method ContextLogger.Alertf should have comment or be unexported (golint)
    • Line 108: warning: exported method ContextLogger.Criticalf should have comment or be unexported (golint)
    • Line 112: warning: exported method ContextLogger.Errorf should have comment or be unexported (golint)
    • Line 116: warning: exported method ContextLogger.Warningf should have comment or be unexported (golint)
    • Line 120: warning: exported method ContextLogger.Noticef should have comment or be unexported (golint)
    • Line 124: warning: exported method ContextLogger.Infof should have comment or be unexported (golint)
    • Line 128: warning: exported method ContextLogger.Debugf 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!