Preparing report...

Report for github.com/fleaz/CptHook

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


gocyclo90%

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.


golint54%

Golint is a linter for Go source code.

    • CptHook/main.go
    • Line 43: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 47: warning: exported type InputModule should have comment or be unexported (golint)
    • CptHook/input/gitlab.go
    • Line 16: warning: exported type GitlabModule should have comment or be unexported (golint)
    • Line 50: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 55: warning: exported method GitlabModule.Init should have comment or be unexported (golint)
    • Line 114: warning: exported method GitlabModule.GetChannelList should have comment or be unexported (golint)
    • Line 132: warning: exported method GitlabModule.GetHandler should have comment or be unexported (golint)
    • CptHook/input/icinga2.go
    • Line 17: warning: exported function JsonToTime should have comment or be unexported (golint)
    • Line 25: warning: exported function AgoString should have comment or be unexported (golint)
    • Line 29: warning: exported function ColorHostState should have comment or be unexported (golint)
    • Line 37: warning: exported function ColorServiceState should have comment or be unexported (golint)
    • Line 47: warning: exported type Host should have comment or be unexported (golint)
    • Line 63: warning: exported method Host.ColoredState should have comment or be unexported (golint)
    • Line 67: warning: exported method Host.ColoredLastState should have comment or be unexported (golint)
    • Line 71: warning: exported method Host.LastStateChange should have comment or be unexported (golint)
    • Line 75: warning: exported method Host.LastHardStateChange should have comment or be unexported (golint)
    • Line 79: warning: exported method Host.AgoString should have comment or be unexported (golint)
    • Line 83: warning: exported type Service should have comment or be unexported (golint)
    • Line 98: warning: exported method Service.ColoredState should have comment or be unexported (golint)
    • Line 102: warning: exported method Service.ColoredLastState should have comment or be unexported (golint)
    • Line 106: warning: exported method Service.LastStateChange should have comment or be unexported (golint)
    • Line 110: warning: exported method Service.LastHardStateChange should have comment or be unexported (golint)
    • Line 114: warning: exported method Service.AgoString should have comment or be unexported (golint)
    • Line 118: warning: exported type Notification should have comment or be unexported (golint)
    • Line 130: warning: exported type Icinga2Module should have comment or be unexported (golint)
    • Line 141: warning: exported method Icinga2Module.Init should have comment or be unexported (golint)
    • Line 193: warning: exported method Icinga2Module.GetChannelList should have comment or be unexported (golint)
    • Line 210: warning: exported method Icinga2Module.GetHandler should have comment or be unexported (golint)
    • CptHook/input/prometheus.go
    • Line 18: warning: exported type PrometheusModule should have comment or be unexported (golint)
    • Line 93: warning: exported method PrometheusModule.GetChannelList should have comment or be unexported (golint)
    • Line 97: warning: exported method PrometheusModule.Init should have comment or be unexported (golint)
    • Line 107: warning: exported method PrometheusModule.GetHandler should have comment or be unexported (golint)
    • CptHook/input/simple.go
    • Line 12: warning: exported type SimpleModule should have comment or be unexported (golint)
    • Line 17: warning: exported method SimpleModule.Init should have comment or be unexported (golint)
    • Line 22: warning: exported method SimpleModule.GetChannelList should have comment or be unexported (golint)
    • Line 26: warning: exported method SimpleModule.GetHandler 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!


misspell90%

Misspell Finds commonly misspelled English words