Preparing report...

Report for github.com/huzhongqing/simplelog

A    Great!    Found 5 issues across 8 files

Tweet

gofmt87%

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!


golint50%

Golint is a linter for Go source code.

    • simplelog/format.go
    • Line 15: warning: exported type Format should have comment or be unexported (golint)
    • Line 19: warning: comment on exported type FormatConfig should be of the form "FormatConfig ..." (with optional leading article) (golint)
    • Line 28: warning: comment on exported function NewFormat should be of the form "NewFormat ..." (golint)
    • Line 36: warning: comment on exported function DefaultFormatConfig should be of the form "DefaultFormatConfig ..." (golint)
    • Line 68: warning: comment on exported method Format.Stack should be of the form "Stack ..." (golint)
    • simplelog/pool.go
    • Line 9: warning: exported type BufferPool should have comment or be unexported (golint)
    • Line 17: warning: exported function NewBufferPool should have comment or be unexported (golint)
    • Line 27: warning: exported method BufferPool.Get should have comment or be unexported (golint)
    • Line 33: warning: exported method BufferPool.Put should have comment or be unexported (golint)
    • Line 37: warning: exported type Buffer should have comment or be unexported (golint)
    • Line 41: warning: exported method Buffer.AppendString should have comment or be unexported (golint)
    • Line 45: warning: exported method Buffer.Len should have comment or be unexported (golint)
    • Line 49: warning: exported method Buffer.Bytes should have comment or be unexported (golint)
    • Line 57: warning: exported method Buffer.Reset should have comment or be unexported (golint)
    • simplelog/simple_log.go
    • Line 18: warning: comment on exported type SimpleLogger should be of the form "SimpleLogger ..." (with optional leading article) (golint)
    • Line 29: warning: exported const DebugLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: comment on exported method SimpleLogger.Debug should be of the form "Debug ..." (golint)
    • Line 78: warning: comment on exported method SimpleLogger.Info should be of the form "Info ..." (golint)
    • Line 86: warning: comment on exported method SimpleLogger.Warn should be of the form "Warn ..." (golint)
    • Line 152: warning: comment on exported method SimpleLogger.Close should be of the form "Close ..." (golint)
    • simplelog/write.go
    • Line 44: warning: exported type WriteConfig should have comment or be unexported (golint)
    • Line 55: warning: exported function DefaultWriteConfig should have comment or be unexported (golint)
    • Line 103: warning: exported method Write.Sync should have comment or be unexported (golint)
    • Line 142: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 176: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 182: warning: if block ends with a return statement, so drop this else and outdent its block (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!