Preparing report...

Report for github.com/anchore/kai

A+    Excellent!    Found 20 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!


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!


golint37%

Golint is a linter for Go source code.

    • kai/kai/logger/logger.go
    • Line 1: warning: package comment should be of the form "Package logger ..." (golint)
    • Line 4: warning: exported type Logger should have comment or be unexported (golint)
    • kai/kai/result/result.go
    • Line 1: warning: package comment should be of the form "Package result ..." (golint)
    • Line 8: warning: exported type Result should have comment or be unexported (golint)
    • kai/internal/config/user_config.go
    • Line 1: warning: package comment should be of the form "Package config ..." (golint)
    • Line 10: warning: exported const PrivateKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported var UserConfs should have comment or be unexported (golint)
    • Line 24: warning: exported type UserConf should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function ParseUserConf should be of the form "ParseUserConf ..." (golint)
    • kai/internal/version/build.go
    • Line 1: warning: package comment should be of the form "Package version ..." (golint)
    • Line 17: warning: exported type Version should have comment or be unexported (golint)
    • Line 27: warning: comment on exported function FromBuild should be of the form "FromBuild ..." (golint)
    • kai/kai/presenter/option.go
    • Line 1: warning: package comment should be of the form "Package presenter ..." (golint)
    • Line 7: warning: exported const UnknownPresenter should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported var Options should have comment or be unexported (golint)
    • Line 23: warning: exported type Option should have comment or be unexported (golint)
    • Line 25: warning: comment on exported function ParseOption should be of the form "ParseOption ..." (golint)
    • kai/internal/config/kube_config.go
    • Line 12: warning: comment on exported type KubeConf should be of the form "KubeConf ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type KubeConfUser should be of the form "KubeConfUser ..." (with optional leading article) (golint)
    • Line 30: warning: exported method KubeConf.IsKubeConfigFromFile should have comment or be unexported (golint)
    • Line 34: warning: exported method KubeConf.IsNonFileKubeConfigValid should have comment or be unexported (golint)
    • Line 48: warning: exported method KubeConf.GetKubeConfigFromConf should have comment or be unexported (golint)
    • kai/kai/mode/mode.go
    • Line 1: warning: package comment should be of the form "Package mode ..." (golint)
    • Line 11: warning: exported const AdHoc should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported var Modes should have comment or be unexported (golint)
    • Line 25: warning: exported type Mode should have comment or be unexported (golint)
    • Line 27: warning: comment on exported function ParseMode should be of the form "ParseMode ..." (golint)
    • kai/kai/result/namespace.go
    • Line 10: warning: comment on exported type Namespace should be of the form "Namespace ..." (with optional leading article) (golint)
    • Line 16: warning: exported type Image should have comment or be unexported (golint)
    • Line 21: warning: exported function NewFromPod should have comment or be unexported (golint)
    • Line 28: warning: exported function New should have comment or be unexported (golint)
    • Line 40: warning: comment on exported method Namespace.AddImages should be of the form "AddImages ..." (golint)
    • kai/kai/lib.go
    • Line 1: warning: package comment should be of the form "Package kai ..." (golint)
    • Line 25: warning: exported function HandleResults should have comment or be unexported (golint)
    • Line 40: warning: comment on exported function PeriodicallyGetImageResults should be of the form "PeriodicallyGetImageResults ..." (golint)
    • Line 69: warning: exported type ImageResult should have comment or be unexported (golint)
    • Line 74: warning: comment on exported function GetImageResults should be of the form "GetImageResults ..." (golint)
    • Line 153: warning: comment on exported function GetAllNamespaces should be of the form "GetAllNamespaces ..." (golint)
    • Line 204: warning: exported function SetLogger should have comment or be unexported (golint)
    • kai/internal/logger/logrus.go
    • Line 1: warning: package comment should be of the form "Package logger ..." (golint)
    • Line 14: warning: comment on exported type LogrusConfig should be of the form "LogrusConfig ..." (with optional leading article) (golint)
    • Line 23: warning: comment on exported type LogrusLogger should be of the form "LogrusLogger ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported type LogrusNestedLogger should be of the form "LogrusNestedLogger ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported function NewLogrusLogger should be of the form "NewLogrusLogger ..." (golint)
    • Line 83: warning: exported method LogrusLogger.Debugf should have comment or be unexported (golint)
    • Line 87: warning: exported method LogrusLogger.Infof should have comment or be unexported (golint)
    • Line 91: warning: exported method LogrusLogger.Debug should have comment or be unexported (golint)
    • Line 95: warning: exported method LogrusLogger.Info should have comment or be unexported (golint)
    • Line 99: warning: exported method LogrusLogger.Warnf should have comment or be unexported (golint)
    • Line 103: warning: exported method LogrusLogger.Errorf should have comment or be unexported (golint)
    • Line 107: warning: exported method LogrusNestedLogger.Debugf should have comment or be unexported (golint)
    • Line 111: warning: exported method LogrusNestedLogger.Infof should have comment or be unexported (golint)
    • Line 115: warning: exported method LogrusNestedLogger.Debug should have comment or be unexported (golint)
    • Line 119: warning: exported method LogrusNestedLogger.Info should have comment or be unexported (golint)
    • Line 123: warning: exported method LogrusNestedLogger.Warnf should have comment or be unexported (golint)
    • Line 127: warning: exported method LogrusNestedLogger.Errorf should have comment or be unexported (golint)
    • kai/cmd/cmd.go
    • Line 46: warning: exported function Execute should have comment or be unexported (golint)
    • Line 53: warning: exported function InitAppConfig should have comment or be unexported (golint)
    • Line 62: warning: exported function GetAppConfig should have comment or be unexported (golint)
    • kai/kai/reporter/reporter.go
    • Line 1: warning: package comment should be of the form "Package reporter ..." (golint)
    • Line 18: warning: exported const ReportAPIPath should have comment or be unexported (golint)
    • Line 20: warning: exported type InventoryReport should have comment or be unexported (golint)
    • Line 26: warning: exported function NewInventoryReport should have comment or be unexported (golint)
    • Line 34: warning: comment on exported function Report should be of the form "Report ..." (golint)
    • kai/internal/log/log.go
    • Line 1: warning: package comment should be of the form "Package log ..." (golint)
    • Line 6: warning: exported var Log should have comment or be unexported (golint)
    • Line 8: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 12: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 16: warning: exported function Infof should have comment or be unexported (golint)
    • Line 20: warning: exported function Info should have comment or be unexported (golint)
    • Line 24: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 28: warning: exported function Debug should have comment or be unexported (golint)
    • kai/kai/client/client.go
    • Line 1: warning: package comment should be of the form "Package client ..." (golint)
    • Line 17: warning: exported const UseInCluster should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function GetClientSet should be of the form "GetClientSet ..." (golint)
    • Line 30: warning: exported function GetKubeConfig should have comment or be unexported (golint)
    • kai/internal/config/config.go
    • Line 1: warning: package comment should be of the form "Package config ..." (golint)
    • Line 33: warning: comment on exported type CliOnlyOptions should be of the form "CliOnlyOptions ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported type Application should be of the form "Application ..." (with optional leading article) (golint)
    • Line 57: warning: comment on exported type AnchoreInfo should be of the form "AnchoreInfo ..." (with optional leading article) (golint)
    • Line 66: warning: comment on exported type HTTPConfig should be of the form "HTTPConfig ..." (with optional leading article) (golint)
    • Line 85: warning: comment on exported method AnchoreInfo.IsValid should be of the form "IsValid ..." (golint)
    • Line 104: warning: comment on exported function LoadConfigFromFile should be of the form "LoadConfigFromFile ..." (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!