Preparing report...

Report for github.com/OpsLevel/kubectl-opslevel

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


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!


golint35%

Golint is a linter for Go source code.

    • kubectl-opslevel/src/jq/jq.go
    • Line 15: warning: exported type JQ should have comment or be unexported (golint)
    • Line 21: warning: exported type JQOpt should have comment or be unexported (golint)
    • Line 26: warning: exported type JQErrorType should have comment or be unexported (golint)
    • Line 29: warning: exported const EmptyFilter should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type JQError should have comment or be unexported (golint)
    • Line 60: warning: exported method JQ.Filter should have comment or be unexported (golint)
    • Line 64: warning: exported method JQ.Options should have comment or be unexported (golint)
    • Line 68: warning: exported method JQ.Commandline should have comment or be unexported (golint)
    • Line 72: warning: exported method JQ.Run should have comment or be unexported (golint)
    • Line 104: warning: exported method JQ.Validate should have comment or be unexported (golint)
    • Line 113: warning: exported function ValidateInstalled should have comment or be unexported (golint)
    • Line 121: warning: exported function New should have comment or be unexported (golint)
    • Line 125: warning: exported function NewWithOptions should have comment or be unexported (golint)
    • kubectl-opslevel/src/cmd/root.go
    • Line 30: warning: exported function Execute should have comment or be unexported (golint)
    • Line 58: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • kubectl-opslevel/src/config/config.go
    • Line 14: warning: exported var ConfigCurrentVersion should have comment or be unexported (golint)
    • Line 17: warning: exported type TagRegistrationConfig should have comment or be unexported (golint)
    • Line 22: warning: exported type ServiceRegistrationConfig should have comment or be unexported (golint)
    • Line 37: warning: exported type Import should have comment or be unexported (golint)
    • Line 42: warning: exported type Service should have comment or be unexported (golint)
    • Line 46: warning: exported type Config should have comment or be unexported (golint)
    • Line 51: warning: exported type ConfigVersion should have comment or be unexported (golint)
    • Line 55: warning: exported function New should have comment or be unexported (golint)
    • Line 59: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • kubectl-opslevel/src/k8sutils/k8sutils.go
    • Line 27: warning: exported type NamespaceSelector should have comment or be unexported (golint)
    • Line 32: warning: exported type KubernetesSelector should have comment or be unexported (golint)
    • Line 40: warning: exported type ClientWrapper should have comment or be unexported (golint)
    • Line 56: warning: exported function CreateKubernetesClient should have comment or be unexported (golint)
    • Line 83: warning: exported method ClientWrapper.GetAllNamespaces should have comment or be unexported (golint)
    • Line 95: warning: exported method ClientWrapper.Query should have comment or be unexported (golint)
    • Line 122: warning: exported function List should have comment or be unexported (golint)
    • Line 137: warning: exported method ClientWrapper.GetMapping should have comment or be unexported (golint)
    • Line 153: warning: exported var MISSING_API_VERSION_ERROR should have comment or be unexported (golint)
    • Line 182: warning: exported method KubernetesSelector.Validate should have comment or be unexported (golint)
    • Line 212: warning: exported method KubernetesSelector.GetListOptions should have comment or be unexported (golint)
    • Line 218: warning: exported method KubernetesSelector.LabelSelector should have comment or be unexported (golint)
    • kubectl-opslevel/src/common/jqparser.go
    • Line 9: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: exported type JQParser should have comment or be unexported (golint)
    • Line 16: warning: exported type JQResponseType should have comment or be unexported (golint)
    • Line 19: warning: exported const Empty should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type JQResponse should have comment or be unexported (golint)
    • Line 40: warning: exported type JQResponseMulti should have comment or be unexported (golint)
    • Line 45: warning: exported function NewJQParser should have comment or be unexported (golint)
    • Line 50: warning: exported function NewJQParserMulti should have comment or be unexported (golint)
    • Line 75: warning: exported method JQParser.Parse should have comment or be unexported (golint)
    • Line 86: warning: exported method JQParser.ParseMulti should have comment or be unexported (golint)
    • Line 97: warning: exported method JQResponse.Unmarshal should have comment or be unexported (golint)
    • Line 147: warning: exported method JQResponseMulti.Unmarshal should have comment or be unexported (golint)
    • Line 154: warning: don't use underscores in Go names; var multi_stringObj should be multiStringObj (golint)
    • Line 155: warning: don't use underscores in Go names; var multi_stringArray should be multiStringArray (golint)
    • Line 156: warning: don't use underscores in Go names; var multi_stringMap should be multiStringMap (golint)
    • Line 157: warning: don't use underscores in Go names; var multi_stringMapArray should be multiStringMapArray (golint)
    • Line 158: warning: don't use underscores in Go names; var multi_boolObj should be multiBoolObj (golint)
    • Line 159: warning: don't use underscores in Go names; var multi_boolArray should be multiBoolArray (golint)
    • kubectl-opslevel/src/common/service.go
    • Line 11: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: exported type SelectorParser should have comment or be unexported (golint)
    • Line 18: warning: exported type ServiceRegistration should have comment or be unexported (golint)
    • Line 166: warning: exported function GetString should have comment or be unexported (golint)
    • Line 173: warning: comment on exported function Parse should be of the form "Parse ..." (golint)
    • Line 241: warning: exported function ConvertToToolCreateInput should have comment or be unexported (golint)
    • Line 253: warning: exported function ConvertToServiceRepositoryCreateInput should have comment or be unexported (golint)
    • Line 275: warning: exported function QueryForServices should have comment or be unexported (golint)
    • Line 346: warning: exported var StartArray should have comment or be unexported (golint)
    • Line 347: warning: exported var EndArray should have comment or be unexported (golint)
    • Line 348: warning: exported var JoinItem should have comment or be unexported (golint)
    • kubectl-opslevel/src/cmd/import.go
    • Line 79: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 95: warning: exported function FindService should have comment or be unexported (golint)
    • Line 107: warning: exported function GetTiers should have comment or be unexported (golint)
    • Line 119: warning: exported function GetLifecycles should have comment or be unexported (golint)
    • Line 131: warning: exported function GetTeams should have comment or be unexported (golint)
    • Line 150: warning: exported function CacheLookupTables should have comment or be unexported (golint)
    • Line 173: warning: exported function CreateService should have comment or be unexported (golint)
    • Line 193: warning: exported function UpdateService should have comment or be unexported (golint)
    • Line 220: warning: exported function AssignAliases should have comment or be unexported (golint)
    • Line 237: warning: exported function AssignTags should have comment or be unexported (golint)
    • Line 247: warning: exported function CreateTags should have comment or be unexported (golint)
    • Line 266: warning: exported function AssignTools should have comment or be unexported (golint)
    • Line 282: warning: exported function AttachRepositories 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!


misspell92%

Misspell Finds commonly misspelled English words