Preparing report...

Report for github.com/Laisky/go-utils

(v1.16.0)

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


gocyclo86%

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.

    • fifo_test.go
    • Line 107: warning: cyclomatic complexity 16 of function BenchmarkFIFOAndChan() is high (> 15) (gocyclo)
    • compressor_test.go
    • Line 287: warning: cyclomatic complexity 43 of function BenchmarkGzip() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 18 of function TestUnzipAndZipFiles() is high (> 15) (gocyclo)
    • counter_test.go
    • Line 424: warning: cyclomatic complexity 34 of function BenchmarkAllCounter() is high (> 15) (gocyclo)
    • Line 191: warning: cyclomatic complexity 17 of function TestParallelRotateCounter() is high (> 15) (gocyclo)
    • cmd/tls.go
    • Line 83: warning: cyclomatic complexity 23 of function generateTLSCert() is high (> 15) (gocyclo)
    • color.go
    • Line 106: warning: cyclomatic complexity 20 of function (*GormLogger).Print() is high (> 15) (gocyclo)
    • heap.go
    • Line 117: warning: cyclomatic complexity 19 of function GetTopKItems() is high (> 15) (gocyclo)
    • utils_test.go
    • Line 436: warning: cyclomatic complexity 19 of function TestSetStructFieldsBySlice() is high (> 15) (gocyclo)

golint92%

Golint is a linter for Go source code.

    • utils.go
    • Line 889: warning: exported type StopSignalOptFunc should have comment or be unexported (golint)
    • heap.go
    • Line 26: warning: exported type HeapSlice should have comment or be unexported (golint)
    • logger.go
    • Line 97: warning: exported type LoggerConfig should have comment or be unexported (golint)
    • Line 103: warning: exported type LoggerEncoding should have comment or be unexported (golint)
    • Line 106: warning: exported const LoggerEncodingConsole should have comment (or a comment on this block) or be unexported (golint)
    • Line 110: warning: exported type LoggerOption should have comment or be unexported (golint)
    • Line 163: warning: comment on exported function ParseLoggerLevel should be of the form "ParseLoggerLevel ..." (golint)
    • skiplist.go
    • Line 5: warning: exported function NewSkiplist 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!