Preparing report...

Report for github.com/hedzr/logex

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


gocyclo96%

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.

    • logex/formatter/txt.fmtr.go
    • Line 212: warning: cyclomatic complexity 33 of function (*TextFormatter).Format() is high (> 15) (gocyclo)
    • Line 405: warning: cyclomatic complexity 17 of function (*TextFormatter).needsQuoting() is high (> 15) (gocyclo)

golint72%

Golint is a linter for Go source code.

    • logex/logx/zap/sugar/init.go
    • Line 86: warning: exported type Opt should have comment or be unexported (golint)
    • Line 138: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • logex/logx/zap/init.go
    • Line 86: warning: exported type Opt should have comment or be unexported (golint)
    • Line 138: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • logex/logx/zap/logx.go
    • Line 118: warning: exported function AsFieldLogger should have comment or be unexported (golint)
    • Line 125: warning: exported type FieldLogger should have comment or be unexported (golint)
    • logex/logx/logrus/init.go
    • Line 52: warning: exported function NewWithConfigSimple should have comment or be unexported (golint)
    • Line 54: warning: exported function NewWithConfig should have comment or be unexported (golint)
    • Line 84: warning: exported type Opt should have comment or be unexported (golint)
    • Line 86: warning: exported function WithLoggingFormat should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.

    • logex/logx/zap/init.go
    • Line 27: warning: ineffectual assignment to level (ineffassign)
    • Line 32: warning: ineffectual assignment to lvl (ineffassign)
    • Line 33: warning: ineffectual assignment to level (ineffassign)
    • Line 69: warning: ineffectual assignment to lvl (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!