Preparing report...

Report for gitea.com/lunny/log

A+    Excellent!    Found 3 issues across 5 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!


golint40%

Golint is a linter for Go source code.

    • /gitea.com/lunny/log/dbwriter.go
    • Line 8: warning: exported type DBWriter should have comment or be unexported (golint)
    • Line 14: warning: exported function NewDBWriter should have comment or be unexported (golint)
    • Line 34: warning: exported method DBWriter.Close should have comment or be unexported (golint)
    • /gitea.com/lunny/log/filewriter.go
    • Line 13: warning: exported type ByType should have comment or be unexported (golint)
    • Line 16: warning: exported const ByDay should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported function SetFileFormat should have comment or be unexported (golint)
    • Line 33: warning: exported method ByType.Format should have comment or be unexported (golint)
    • Line 37: warning: exported type Files should have comment or be unexported (golint)
    • Line 44: warning: exported type FileOptions should have comment or be unexported (golint)
    • Line 69: warning: exported function NewFileWriter should have comment or be unexported (golint)
    • Line 106: warning: exported method Files.Close should have comment or be unexported (golint)
    • /gitea.com/lunny/log/logext.go
    • Line 33: warning: exported function Ldefault should have comment or be unexported (golint)
    • Line 40: warning: exported function Version should have comment or be unexported (golint)
    • Line 45: warning: exported const Lall should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported const Ldebug should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported const ForeBlack should have comment (or a comment on this block) or be unexported (golint)
    • Line 69: warning: exported const BackBlack should have comment (or a comment on this block) or be unexported (golint)
    • Line 88: warning: comment on exported function SetLevels should be of the form "SetLevels ..." (golint)
    • Line 102: warning: comment on exported function SetColors should be of the form "SetColors ..." (golint)
    • Line 134: warning: exported var Std should have comment or be unexported (golint)
    • Line 305: warning: exported method Logger.Debugf should have comment or be unexported (golint)
    • Line 309: warning: exported method Logger.Debug should have comment or be unexported (golint)
    • Line 313: warning: comment on exported method Logger.Infof should be of the form "Infof ..." (golint)
    • Line 318: warning: exported method Logger.Info should have comment or be unexported (golint)
    • Line 322: warning: comment on exported method Logger.Warnf should be of the form "Warnf ..." (golint)
    • Line 327: warning: exported method Logger.Warn should have comment or be unexported (golint)
    • Line 333: warning: exported method Logger.Errorf should have comment or be unexported (golint)
    • Line 343: warning: exported method Logger.Fatal should have comment or be unexported (golint)
    • Line 354: warning: comment on exported method Logger.Panic should be of the form "Panic ..." (golint)
    • Line 369: warning: comment on exported method Logger.Stack should be of the form "Stack ..." (golint)
    • Line 380: warning: comment on exported method Logger.Stat should be of the form "Stat ..." (golint)
    • Line 395: warning: exported function RmColorFlags should have comment or be unexported (golint)
    • Line 406: warning: exported method Logger.Location should have comment or be unexported (golint)
    • Line 410: warning: exported method Logger.SetLocation should have comment or be unexported (golint)
    • Line 445: warning: exported method Logger.OutputLevel should have comment or be unexported (golint)
    • Line 449: warning: exported method Logger.SetOutput should have comment or be unexported (golint)
    • Line 463: warning: exported function SetLocation should have comment or be unexported (golint)
    • Line 467: warning: exported function Location should have comment or be unexported (golint)
    • Line 491: warning: exported function SetOutputLevel should have comment or be unexported (golint)
    • Line 495: warning: exported function OutputLevel should have comment or be unexported (golint)
    • Line 521: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 525: warning: exported function Debug should have comment or be unexported (golint)
    • Line 531: warning: exported function Infof should have comment or be unexported (golint)
    • Line 535: warning: exported function Info should have comment or be unexported (golint)
    • Line 541: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 545: warning: exported function Warn should have comment or be unexported (golint)
    • Line 551: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 555: warning: exported function Error should have comment or be unexported (golint)
    • Line 585: warning: exported function Stack 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!