Preparing report...

Report for github.com/gogap/redconf

A    Great!    Found 11 issues across 14 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!


gocyclo92%

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.


golint28%

Golint is a linter for Go source code.

    • redconf/redconf.go
    • Line 9: warning: exported type OnValueChangedSubscriber should have comment or be unexported (golint)
    • Line 11: warning: exported type OnValueChangedEvent should have comment or be unexported (golint)
    • Line 19: warning: exported type RedConf should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 59: warning: exported method RedConf.Watch should have comment or be unexported (golint)
    • Line 77: warning: exported method RedConf.Subscribe should have comment or be unexported (golint)
    • Line 89: warning: exported method RedConf.Keys should have comment or be unexported (golint)
    • Line 99: warning: exported method RedConf.WatchWithConfig should have comment or be unexported (golint)
    • Line 144: warning: exported method RedConf.Namespace should have comment or be unexported (golint)
    • redconf/redis_monitor.go
    • Line 16: warning: exported const DefaultSubscribeChannel should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type RedisMonitor should have comment or be unexported (golint)
    • Line 33: warning: exported function NewRedisMonitor should have comment or be unexported (golint)
    • Line 64: warning: exported method RedisMonitor.Watch should have comment or be unexported (golint)
    • redconf/storage.go
    • Line 8: warning: exported type NewStorageFunc should have comment or be unexported (golint)
    • Line 10: warning: exported type Storage should have comment or be unexported (golint)
    • Line 21: warning: exported function RegisterStorage should have comment or be unexported (golint)
    • Line 45: warning: exported function CreateStorage should have comment or be unexported (golint)
    • redconf/field.go
    • Line 8: warning: exported type Field should have comment or be unexported (golint)
    • Line 18: warning: exported method Field.Name should have comment or be unexported (golint)
    • Line 22: warning: exported method Field.Type should have comment or be unexported (golint)
    • Line 26: warning: exported method Field.Kind should have comment or be unexported (golint)
    • Line 30: warning: exported method Field.Level should have comment or be unexported (golint)
    • Line 38: warning: exported method Field.Parents should have comment or be unexported (golint)
    • Line 66: warning: exported method Field.Value should have comment or be unexported (golint)
    • redconf/monitor.go
    • Line 8: warning: exported type KeyContentChangedCallback should have comment or be unexported (golint)
    • Line 10: warning: exported type OnWatchingError should have comment or be unexported (golint)
    • Line 12: warning: exported type NewMonitorFunc should have comment or be unexported (golint)
    • Line 14: warning: exported type Monitor should have comment or be unexported (golint)
    • Line 24: warning: exported function RegisterMonitor should have comment or be unexported (golint)
    • Line 48: warning: exported function CreateMonitor should have comment or be unexported (golint)
    • redconf/options.go
    • Line 9: warning: exported type Options should have comment or be unexported (golint)
    • Line 11: warning: exported method Options.Get should have comment or be unexported (golint)
    • Line 28: warning: exported method Options.ToObject should have comment or be unexported (golint)
    • redconf/redis_storage.go
    • Line 11: warning: exported type RedisStorage should have comment or be unexported (golint)
    • Line 23: warning: exported function NewRedisStorage should have comment or be unexported (golint)
    • Line 65: warning: exported method RedisStorage.Set should have comment or be unexported (golint)
    • Line 76: warning: exported method RedisStorage.Get should have comment or be unexported (golint)
    • redconf/watching_config.go
    • Line 10: warning: exported type WatchingConfig should have comment or be unexported (golint)
    • Line 18: warning: exported function NewWatchingConfig should have comment or be unexported (golint)
    • Line 68: warning: exported method WatchingConfig.Name should have comment or be unexported (golint)
    • Line 72: warning: exported method WatchingConfig.Fields should have comment or be unexported (golint)
    • redconf/example/main.go
    • Line 11: warning: exported type Account should have comment or be unexported (golint)
    • Line 16: warning: exported type ServerConfig should have comment or be unexported (golint)
    • Line 22: warning: exported type LogConfig should have comment or be unexported (golint)
    • Line 27: warning: exported type AppConfig should have comment or be unexported (golint)
    • Line 98: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign78%

IneffAssign detects ineffectual assignments in Go code.

    • redconf/example/main.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/gogap/redconf (invalid package name: "") (ineffassign)
    • redconf/cmd/json2redis/main.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/garyburd/redigo/redis (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/urfave/cli (invalid package name: "") (ineffassign)
    • redconf/redis_monitor.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/garyburd/redigo/redis (invalid package name: "") (ineffassign)
    • Line 5: warning: "strings" imported but not used (ineffassign)
    • Line 8: warning: could not import github.com/garyburd/redigo/redis (invalid package name: "") (ineffassign)
    • Line 5: warning: "strings" imported but not used (ineffassign)

misspell92%

Misspell Finds commonly misspelled English words