Preparing report...

Report for github.com/k8guard/k8guardlibs

A    Great!    Found 18 issues across 19 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!


gocyclo100%

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.

No problems detected. Good job!


golint5%

Golint is a linter for Go source code.

    • k8guardlibs/messaging/factory.go
    • Line 12: warning: exported function CreateMessageProducer should have comment or be unexported (golint)
    • Line 23: warning: exported function CreateMessageConsumer should have comment or be unexported (golint)
    • k8guardlibs/caching/types/types.go
    • Line 5: warning: exported type CacheType should have comment or be unexported (golint)
    • Line 8: warning: comment on exported const MEMCACHE_CACHE should be of the form "MEMCACHE_CACHE ..." (golint)
    • Line 10: warning: exported const REDIS_CACHE should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type Cache should have comment or be unexported (golint)
    • k8guardlibs/messaging/types/types.go
    • Line 3: warning: exported type ClientID should have comment or be unexported (golint)
    • Line 5: warning: exported type MessageType should have comment or be unexported (golint)
    • Line 7: warning: exported type MessageBrokerType should have comment or be unexported (golint)
    • Line 10: warning: comment on exported const KAFKA_BROKER should be of the form "KAFKA_BROKER ..." (golint)
    • Line 12: warning: exported const RMQ_BROKER should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: comment on exported const NAMESPACE_MESSAGE should be of the form "NAMESPACE_MESSAGE ..." (golint)
    • Line 24: warning: comment on exported const ACTION_CLIENTID should be of the form "ACTION_CLIENTID ..." (golint)
    • Line 28: warning: comment on exported const EVENT_CONSUMER_CLIENTID should be of the form "EVENT_CONSUMER_CLIENTID ..." (golint)
    • Line 33: warning: exported type MessageProducer should have comment or be unexported (golint)
    • Line 39: warning: exported type MessageConsumer should have comment or be unexported (golint)
    • k8guardlibs/loadconfig.go
    • Line 8: warning: exported var Cfg should have comment or be unexported (golint)
    • Line 10: warning: exported function LoadConfig should have comment or be unexported (golint)
    • k8guardlibs/logging.go
    • Line 7: warning: exported var Log should have comment or be unexported (golint)
    • Line 9: warning: exported function SetLogger should have comment or be unexported (golint)
    • k8guardlibs/violations/const.go
    • Line 3: warning: exported type ViolationType should have comment or be unexported (golint)
    • Line 6: warning: comment on exported const REQUIRED_ENTITIES_TYPE should be of the form "REQUIRED_ENTITIES_TYPE ..." (golint)
    • Line 9: warning: exported const REQUIRED_ANNOTATIONS_TYPE should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: comment on exported const NO_OWNER_ANNOTATION_TYPE should be of the form "NO_OWNER_ANNOTATION_TYPE ..." (golint)
    • Line 19: warning: comment on exported const SINGLE_REPLICA_TYPE should be of the form "SINGLE_REPLICA_TYPE ..." (golint)
    • Line 25: warning: comment on exported const IMAGE_REPO_TYPE should be of the form "IMAGE_REPO_TYPE ..." (golint)
    • Line 29: warning: comment on exported const HOST_VOLUMES_TYPE should be of the form "HOST_VOLUMES_TYPE ..." (golint)
    • Line 32: warning: comment on exported const INGRESS_HOST_INVALID_TYPE should be of the form "INGRESS_HOST_INVALID_TYPE ..." (golint)
    • Line 35: warning: comment on exported const PRIVILEGED_TYPE should be of the form "PRIVILEGED_TYPE ..." (golint)
    • Line 39: warning: comment on exported const REQUIRED_PODS_TYPE should be of the form "REQUIRED_PODS_TYPE ..." (golint)
    • Line 44: warning: comment on exported const REQUIRED_DAEMONSETS_TYPE should be of the form "REQUIRED_DAEMONSETS_TYPE ..." (golint)
    • k8guardlibs/models.go
    • Line 7: warning: comment on exported type Entity should be of the form "Entity ..." (with optional leading article) (golint)
    • Line 12: warning: comment on exported type ViolatableEntity should be of the form "ViolatableEntity ..." (with optional leading article) (golint)
    • Line 20: warning: exported type Namespace should have comment or be unexported (golint)
    • Line 24: warning: exported type Ingress should have comment or be unexported (golint)
    • Line 28: warning: exported type Deployment should have comment or be unexported (golint)
    • Line 32: warning: exported type DaemonSet should have comment or be unexported (golint)
    • Line 36: warning: exported type Job should have comment or be unexported (golint)
    • Line 40: warning: exported type CronJob should have comment or be unexported (golint)
    • Line 44: warning: exported type Pod should have comment or be unexported (golint)
    • Line 49: warning: exported var Version 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!