Preparing report...

Report for github.com/phuslu/log

(v1.0.108)

A+    Excellent!    Found 9 issues across 46 files

Tweet

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!


gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


gocyclo80%

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.

    • logger.go
    • Line 2152: warning: cyclomatic complexity 37 of function (*Entry).Any() is high (> 15) (gocyclo)
    • Line 463: warning: cyclomatic complexity 21 of function (*Logger).header() is high (> 15) (gocyclo)
    • Line 980: warning: cyclomatic complexity 16 of function appendFloat() is high (> 15) (gocyclo)
    • journal.go
    • Line 33: warning: cyclomatic complexity 32 of function (*JournalWriter).WriteEntry() is high (> 15) (gocyclo)
    • console.go
    • Line 75: warning: cyclomatic complexity 26 of function (*ConsoleWriter).format() is high (> 15) (gocyclo)
    • file.go
    • Line 154: warning: cyclomatic complexity 21 of function (*FileWriter).rotate() is high (> 15) (gocyclo)
    • syslog.go
    • Line 83: warning: cyclomatic complexity 16 of function (*SyslogWriter).WriteEntry() is high (> 15) (gocyclo)
    • console_windows.go
    • Line 49: warning: cyclomatic complexity 29 of function (*ConsoleWriter).writew() is high (> 15) (gocyclo)
    • slog.go
    • Line 107: warning: cyclomatic complexity 29 of function (*slogJSONHandler).Handle() is high (> 15) (gocyclo)
    • formatter.go
    • Line 57: warning: cyclomatic complexity 21 of function parseFormatterArgs() is high (> 15) (gocyclo)
    • Line 293: warning: cyclomatic complexity 19 of function jsonUnescape() is high (> 15) (gocyclo)
    • Line 166: warning: cyclomatic complexity 16 of function jsonParseAny() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!