Preparing report...

Report for github.com/finleap-connect/vaultoperator

(v0.14.0)

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


gocyclo85%

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.

    • vault/client.go
    • Line 100: warning: cyclomatic complexity 16 of function (*Client).CreateOrUpdate() is high (> 15) (gocyclo)

golint40%

Golint is a linter for Go source code.

    • vault/auth.go
    • Line 40: warning: exported method AppRoleAuth.Login should have comment or be unexported (golint)
    • Line 47: warning: exported method AppRoleAuth.Name should have comment or be unexported (golint)
    • Line 49: warning: exported method AppRoleAuth.IsRenewable should have comment or be unexported (golint)
    • Line 51: warning: exported type TokenAuth should have comment or be unexported (golint)
    • Line 55: warning: exported method TokenAuth.Login should have comment or be unexported (golint)
    • Line 59: warning: exported method TokenAuth.Name should have comment or be unexported (golint)
    • Line 61: warning: exported method TokenAuth.IsRenewable should have comment or be unexported (golint)
    • util/crypto.go
    • Line 27: warning: exported function GenerateRSA should have comment or be unexported (golint)
    • Line 37: warning: exported function GenerateECDSA should have comment or be unexported (golint)
    • util/random_data.go
    • Line 30: warning: exported function RandBytes should have comment or be unexported (golint)
    • Line 38: warning: exported function RandString should have comment or be unexported (golint)
    • Line 42: warning: exported function RandPassword should have comment or be unexported (golint)
    • controllers/vaultsecret_controller.go
    • Line 59: warning: comment on exported method VaultSecretReconciler.Reconcile should be of the form "Reconcile ..." (golint)
    • Line 237: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 299: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 337: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 477: warning: exported method VaultSecretReconciler.SetupWithManager should have comment or be unexported (golint)
    • api/v1alpha1/vaultsecret_types.go
    • Line 25: warning: comment on exported type VaultSecretGeneratorName should be of the form "VaultSecretGeneratorName ..." (with optional leading article) (golint)
    • Line 28: warning: comment on exported type VaultSecretGenerator should be of the form "VaultSecretGenerator ..." (with optional leading article) (golint)
    • Line 38: warning: exported type VaultSecretLocation should have comment or be unexported (golint)
    • Line 55: warning: exported type VaultSecretVariable should have comment or be unexported (golint)
    • Line 68: warning: comment on exported type VaultSecretData should be of the form "VaultSecretData ..." (with optional leading article) (golint)
    • Line 87: warning: comment on exported type FieldCollisionStrategy should be of the form "FieldCollisionStrategy ..." (with optional leading article) (golint)
    • Line 91: warning: comment on exported const ErrorOnCollision should be of the form "ErrorOnCollision ..." (golint)
    • Line 94: warning: comment on exported const IgnoreCollision should be of the form "IgnoreCollision ..." (golint)
    • Line 97: warning: comment on exported const OverwriteCollision should be of the form "OverwriteCollision ..." (golint)
    • Line 101: warning: comment on exported type VaultSecretDataRef should be of the form "VaultSecretDataRef ..." (with optional leading article) (golint)
    • api/v1alpha1/vaultsecret_webhook.go
    • Line 29: warning: exported method VaultSecret.SetupWebhookWithManager should have comment or be unexported (golint)
    • Line 111: warning: exported method VaultSecret.ValidateDelete should have comment or be unexported (golint)
    • vault/dev_server.go
    • Line 29: warning: exported type DevServer should have comment or be unexported (golint)
    • Line 38: warning: exported function NewDevServer should have comment or be unexported (golint)
    • Line 62: warning: exported method DevServer.GetClient should have comment or be unexported (golint)
    • Line 66: warning: exported method DevServer.Stop should have comment or be unexported (golint)
    • Line 77: warning: exported method DevServer.ExecCommand should have comment or be unexported (golint)
    • api/v1alpha1/vaultsecret_helper.go
    • Line 17: warning: comment on exported type AnyVaultSecretData should be of the form "AnyVaultSecretData ..." (with optional leading article) (golint)
    • Line 25: warning: exported method VaultSecretData.GetName should have comment or be unexported (golint)
    • Line 29: warning: exported method VaultSecretData.GetLocation should have comment or be unexported (golint)
    • Line 33: warning: exported method VaultSecretData.GetGenerator should have comment or be unexported (golint)
    • Line 37: warning: exported method VaultSecretData.GetCollisionStrategy should have comment or be unexported (golint)
    • Line 41: warning: exported method VaultSecretVariable.GetName should have comment or be unexported (golint)
    • Line 45: warning: exported method VaultSecretVariable.GetLocation should have comment or be unexported (golint)
    • Line 49: warning: exported method VaultSecretVariable.GetGenerator should have comment or be unexported (golint)
    • Line 53: warning: exported method VaultSecretVariable.GetCollisionStrategy should have comment or be unexported (golint)
    • Line 57: warning: exported method VaultSecretDataRef.GetName should have comment or be unexported (golint)
    • Line 61: warning: exported method VaultSecretDataRef.GetLocation should have comment or be unexported (golint)
    • Line 65: warning: exported method VaultSecretDataRef.GetGenerator should have comment or be unexported (golint)
    • Line 69: warning: exported method VaultSecretDataRef.GetCollisionStrategy should have comment or be unexported (golint)
    • vault/client.go
    • Line 33: warning: exported type Client should have comment or be unexported (golint)
    • Line 39: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 66: warning: exported method Client.GetAll should have comment or be unexported (golint)
    • Line 83: warning: exported method Client.Get should have comment or be unexported (golint)
    • Line 100: warning: exported method Client.CreateOrUpdate should have comment or be unexported (golint)
    • Line 153: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 159: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 198: warning: exported function GetIsBinaryKey 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!


misspell85%

Misspell Finds commonly misspelled English words