Report for github.com/jenkins-x-plugins/jx-secret

A+    Excellent!    Found 32 issues across 100 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!


gocyclo91%

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.

    • jx-secret/pkg/cmd/convert/convert.go
    • Line 164: warning: cyclomatic complexity 37 of function (*Options).ModifyYAML() is high (> 15) (gocyclo)
    • Line 621: warning: cyclomatic complexity 23 of function (*Options).moveMetadataToTemplate() is high (> 15) (gocyclo)
    • Line 458: warning: cyclomatic complexity 18 of function (*Options).modifyDefault() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 17 of function (*Options).convertData() is high (> 15) (gocyclo)
    • Line 556: warning: cyclomatic complexity 17 of function (*Options).modifyGSM() is high (> 15) (gocyclo)

golint74%

Golint is a linter for Go source code.

    • jx-secret/pkg/extsecrets/editor/azure/azure_editor.go
    • Line 19: warning: exported type KeyVault should have comment or be unexported (golint)
    • Line 23: warning: exported type KeyVaultClient should have comment or be unexported (golint)
    • Line 25: warning: exported method KeyVaultClient.SetSecret should have comment or be unexported (golint)
    • Line 46: warning: exported function NewEditor should have comment or be unexported (golint)
    • jx-secret/pkg/apis/mapping/v1alpha1/types.go
    • Line 15: warning: exported const SecretMappingFileName should have comment (or a comment on this block) or be unexported (golint)
    • Line 187: warning: comment on exported method SecretMapping.FindSecret should be of the form "FindSecret ..." (golint)
    • Line 198: warning: exported method SecretMapping.IsSecretKeyUnsecured should have comment or be unexported (golint)
    • Line 222: warning: comment on exported method SecretMapping.Validate should be of the form "Validate ..." (golint)
    • jx-secret/pkg/cmd/convert/convert.go
    • Line 49: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 94: warning: exported method Options.Validate should have comment or be unexported (golint)
    • Line 123: warning: exported method Options.Run should have comment or be unexported (golint)
    • jx-secret/pkg/cmd/version/version.go
    • Line 28: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 55: warning: exported function GetVersion should have comment or be unexported (golint)
    • jx-secret/pkg/cmd/populate/populate.go
    • Line 46: warning: exported var DefaultBackoff should have comment or be unexported (golint)
    • Line 97: warning: exported method Options.Validate should have comment or be unexported (golint)
    • Line 272: warning: exported function GetSecretStore should have comment or be unexported (golint)
    • Line 281: warning: exported function GetSecretKey should have comment or be unexported (golint)
    • Line 320: warning: exported function GetExternalSecretLocation should have comment or be unexported (golint)
    • Line 514: warning: exported function KubectlExecRunner should have comment or be unexported (golint)
    • jx-secret/pkg/extsecrets/secretfacade/types.go
    • Line 40: warning: exported type ExternalSecretLocation should have comment or be unexported (golint)
    • Line 42: warning: exported const FileSystem should have comment or be unexported (golint)
    • Line 43: warning: exported const Kubernetes should have comment or be unexported (golint)
    • Line 45: warning: exported method Options.AddFlags should have comment or be unexported (golint)
    • Line 52: warning: exported method Options.Validate should have comment or be unexported (golint)
    • Line 74: warning: exported method Options.ExternalSecretByName should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!