Preparing report...

Report for github.com/lovego/logc

A+    Excellent!    Found 21 issues across 32 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.


golint34%

Golint is a linter for Go source code.

    • logc/outputs/elasticsearch/time_series_index/group.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 7: warning: exported type Rows should have comment or be unexported (golint)
    • Line 12: warning: exported method TimeSeriesIndex.Group should have comment or be unexported (golint)
    • Line 33: warning: exported method TimeSeriesIndex.Of should have comment or be unexported (golint)
    • Line 51: warning: exported method TimeSeriesIndex.Get should have comment or be unexported (golint)
    • logc/config/config.go
    • Line 11: warning: exported type Config should have comment or be unexported (golint)
    • Line 21: warning: exported type Rotate should have comment or be unexported (golint)
    • logc/collector/loop.go
    • Line 60: warning: exported method Collector.NotifyWrite should have comment or be unexported (golint)
    • Line 67: warning: exported method Collector.NotifyClose should have comment or be unexported (golint)
    • Line 74: warning: exported method Collector.OpenedSameFile should have comment or be unexported (golint)
    • Line 78: warning: exported method Collector.Printf should have comment or be unexported (golint)
    • logc/collector/reader/reader_support.go
    • Line 31: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 76: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • logc/collector/reader/config.go
    • Line 17: warning: exported type Config should have comment or be unexported (golint)
    • Line 22: warning: exported type Batch should have comment or be unexported (golint)
    • Line 27: warning: exported function Setup should have comment or be unexported (golint)
    • logc/config/misc.go
    • Line 15: warning: exported function Alarm should have comment or be unexported (golint)
    • Line 32: warning: exported function Logger should have comment or be unexported (golint)
    • logc/collector/new.go
    • Line 11: warning: exported type Reader should have comment or be unexported (golint)
    • Line 18: warning: exported type Collector should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • logc/collector/support.go
    • Line 17: warning: exported function Setup should have comment or be unexported (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • logc/collector/reader/reader.go
    • Line 12: warning: exported type Reader should have comment or be unexported (golint)
    • Line 21: warning: exported function New should have comment or be unexported (golint)
    • Line 76: warning: exported method Reader.SaveOffset should have comment or be unexported (golint)
    • Line 79: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 84: warning: exported method Reader.SameFile should have comment or be unexported (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 95: warning: exported method Reader.Close should have comment or be unexported (golint)
    • logc/outputs/outputs.go
    • Line 10: warning: exported function Setup should have comment or be unexported (golint)
    • Line 15: warning: exported type Output should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function Maker should be of the form "Maker ..." (golint)
    • Line 32: warning: exported function New should have comment or be unexported (golint)
    • Line 38: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • logc/watch/watch.go
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported type Collector should have comment or be unexported (golint)
    • Line 31: warning: exported function Watch should have comment or be unexported (golint)
    • logc/outputs/elasticsearch/new.go
    • Line 17: warning: exported function Setup should have comment or be unexported (golint)
    • Line 21: warning: exported type ElasticSearch should have comment or be unexported (golint)
    • Line 33: warning: exported function New should have comment or be unexported (golint)
    • Line 124: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (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!


misspell96%

Misspell Finds commonly misspelled English words