Preparing report...

Report for github.com/redhat-cop/vault-config-operator

A    Great!    Found 31 issues across 36 files

Tweet

gofmt97%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


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!


gocyclo97%

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.


golint22%

Golint is a linter for Go source code.

    • vault-config-operator/api/v1alpha1/utils/vaultobject.go
    • Line 27: warning: exported type VaultObject should have comment or be unexported (golint)
    • Line 37: warning: exported type VaultEndpoint should have comment or be unexported (golint)
    • Line 41: warning: exported function NewVaultEndpoint should have comment or be unexported (golint)
    • Line 47: warning: exported method VaultEndpoint.DeleteIfExists should have comment or be unexported (golint)
    • Line 63: warning: exported method VaultEndpoint.Create should have comment or be unexported (golint)
    • Line 67: warning: exported method VaultEndpoint.CreateOrUpdate should have comment or be unexported (golint)
    • Line 76: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • vault-config-operator/api/v1alpha1/policy_types.go
    • Line 33: warning: exported method Policy.GetPath should have comment or be unexported (golint)
    • Line 36: warning: exported method Policy.GetPayload should have comment or be unexported (golint)
    • Line 41: warning: exported method Policy.IsEquivalentToDesiredState should have comment or be unexported (golint)
    • Line 45: warning: exported method Policy.IsInitialized should have comment or be unexported (golint)
    • Line 49: warning: exported method Policy.PrepareInternalValues should have comment or be unexported (golint)
    • Line 53: warning: exported method Policy.IsValid should have comment or be unexported (golint)
    • Line 53: warning: receiver name r should be consistent with previous receiver name d for Policy (golint)
    • Line 81: warning: exported method Policy.GetConditions should have comment or be unexported (golint)
    • Line 81: warning: receiver name m should be consistent with previous receiver name d for Policy (golint)
    • Line 85: warning: exported method Policy.SetConditions should have comment or be unexported (golint)
    • Line 85: warning: receiver name m should be consistent with previous receiver name d for Policy (golint)
    • vault-config-operator/api/v1alpha1/commons.go
    • Line 32: warning: comment on exported type Path should be of the form "Path ..." (with optional leading article) (golint)
    • Line 35: warning: exported type KubeAuthConfiguration should have comment or be unexported (golint)
    • Line 55: warning: exported method KubeAuthConfiguration.GetNamespace should have comment or be unexported (golint)
    • Line 58: warning: exported method KubeAuthConfiguration.GetRole should have comment or be unexported (golint)
    • Line 61: warning: exported method KubeAuthConfiguration.GetKubeAuthPath should have comment or be unexported (golint)
    • Line 65: warning: exported method KubeAuthConfiguration.GetServiceAccountName should have comment or be unexported (golint)
    • Line 69: warning: exported method KubeAuthConfiguration.GetVaultClient should have comment or be unexported (golint)
    • Line 123: 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 172: warning: exported type VaultSecretReference should have comment or be unexported (golint)
    • Line 178: warning: exported function GetFinalizer should have comment or be unexported (golint)
    • vault-config-operator/api/v1alpha1/databasesecretenginerole_types.go
    • Line 51: warning: exported method DatabaseSecretEngineRole.GetPath should have comment or be unexported (golint)
    • Line 54: warning: exported method DatabaseSecretEngineRole.GetPayload should have comment or be unexported (golint)
    • Line 57: warning: exported method DatabaseSecretEngineRole.IsEquivalentToDesiredState should have comment or be unexported (golint)
    • Line 62: warning: exported method DatabaseSecretEngineRole.IsInitialized should have comment or be unexported (golint)
    • Line 66: warning: exported method DatabaseSecretEngineRole.PrepareInternalValues should have comment or be unexported (golint)
    • Line 70: warning: exported method DatabaseSecretEngineRole.IsValid should have comment or be unexported (golint)
    • Line 70: warning: receiver name r should be consistent with previous receiver name d for DatabaseSecretEngineRole (golint)
    • Line 74: warning: exported type DBSERole should have comment or be unexported (golint)
    • Line 124: warning: exported method DatabaseSecretEngineRole.GetConditions should have comment or be unexported (golint)
    • Line 124: warning: receiver name m should be consistent with previous receiver name d for DatabaseSecretEngineRole (golint)
    • Line 128: warning: exported method DatabaseSecretEngineRole.SetConditions should have comment or be unexported (golint)
    • Line 128: warning: receiver name m should be consistent with previous receiver name d for DatabaseSecretEngineRole (golint)
    • Line 157: warning: exported function DatabaseSecretEngineRoleSpecFromMap should have comment or be unexported (golint)
    • Line 169: warning: exported method DBSERole.ToMap should have comment or be unexported (golint)
    • vault-config-operator/api/v1alpha1/secretenginemount_types.go
    • Line 34: warning: exported method SecretEngineMount.GetPath should have comment or be unexported (golint)
    • Line 37: warning: exported method SecretEngineMount.GetPayload should have comment or be unexported (golint)
    • Line 40: warning: exported method SecretEngineMount.IsEquivalentToDesiredState should have comment or be unexported (golint)
    • Line 47: warning: exported method SecretEngineMount.IsInitialized should have comment or be unexported (golint)
    • Line 51: warning: exported method SecretEngineMount.IsValid should have comment or be unexported (golint)
    • Line 55: warning: exported method SecretEngineMount.PrepareInternalValues should have comment or be unexported (golint)
    • Line 59: warning: exported method SecretEngineMount.GetEngineListPath should have comment or be unexported (golint)
    • Line 62: warning: exported method SecretEngineMount.GetEngineTunePath should have comment or be unexported (golint)
    • Line 65: warning: exported method SecretEngineMount.GetTunePayload should have comment or be unexported (golint)
    • Line 87: warning: comment on exported type Mount should be of the form "Mount ..." (with optional leading article) (golint)
    • Line 122: warning: comment on exported type MountConfig should be of the form "MountConfig ..." (with optional leading article) (golint)
    • Line 179: warning: exported method SecretEngineMount.GetConditions should have comment or be unexported (golint)
    • Line 179: warning: receiver name m should be consistent with previous receiver name d for SecretEngineMount (golint)
    • Line 183: warning: exported method SecretEngineMount.SetConditions should have comment or be unexported (golint)
    • Line 183: warning: receiver name m should be consistent with previous receiver name d for SecretEngineMount (golint)
    • vault-config-operator/api/v1alpha1/authenginemount_types.go
    • Line 47: warning: exported type AuthMount should have comment or be unexported (golint)
    • Line 72: warning: exported type AuthMountConfig should have comment or be unexported (golint)
    • Line 153: warning: exported method AuthEngineMount.GetPath should have comment or be unexported (golint)
    • Line 157: warning: exported method AuthEngineMount.GetPayload should have comment or be unexported (golint)
    • Line 160: warning: exported method AuthEngineMount.IsEquivalentToDesiredState should have comment or be unexported (golint)
    • Line 165: warning: exported method AuthEngineMount.IsInitialized should have comment or be unexported (golint)
    • Line 169: warning: exported method AuthEngineMount.IsValid should have comment or be unexported (golint)
    • Line 173: warning: exported method AuthEngineMount.PrepareInternalValues should have comment or be unexported (golint)
    • Line 177: warning: exported method AuthEngineMount.GetEngineListPath should have comment or be unexported (golint)
    • Line 180: warning: exported method AuthEngineMount.GetEngineTunePath should have comment or be unexported (golint)
    • Line 183: warning: exported method AuthEngineMount.GetTunePayload should have comment or be unexported (golint)
    • Line 197: warning: exported method AuthEngineMount.GetConditions should have comment or be unexported (golint)
    • Line 197: warning: receiver name m should be consistent with previous receiver name d for AuthEngineMount (golint)
    • Line 201: warning: exported method AuthEngineMount.SetConditions should have comment or be unexported (golint)
    • Line 201: warning: receiver name m should be consistent with previous receiver name d for AuthEngineMount (golint)
    • vault-config-operator/api/v1alpha1/kubernetesauthengineconfig_types.go
    • Line 53: warning: exported method KubernetesAuthEngineConfig.GetPath should have comment or be unexported (golint)
    • Line 57: warning: exported method KubernetesAuthEngineConfig.GetPayload should have comment or be unexported (golint)
    • Line 60: warning: exported method KubernetesAuthEngineConfig.IsEquivalentToDesiredState should have comment or be unexported (golint)
    • Line 67: warning: exported method KubernetesAuthEngineConfig.IsInitialized should have comment or be unexported (golint)
    • Line 71: warning: exported method KubernetesAuthEngineConfig.PrepareInternalValues should have comment or be unexported (golint)
    • Line 82: warning: receiver name kc should be consistent with previous receiver name d for KubernetesAuthEngineConfig (golint)
    • Line 86: warning: exported method KubernetesAuthEngineConfig.IsValid should have comment or be unexported (golint)
    • Line 86: warning: receiver name r should be consistent with previous receiver name d for KubernetesAuthEngineConfig (golint)
    • Line 90: warning: exported type KAECConfig should have comment or be unexported (golint)
    • Line 133: warning: exported method KubernetesAuthEngineConfig.GetConditions should have comment or be unexported (golint)
    • Line 133: warning: receiver name m should be consistent with previous receiver name d for KubernetesAuthEngineConfig (golint)
    • Line 137: warning: exported method KubernetesAuthEngineConfig.SetConditions should have comment or be unexported (golint)
    • Line 137: warning: receiver name m should be consistent with previous receiver name d for KubernetesAuthEngineConfig (golint)
    • Line 166: warning: exported method KAECConfig.ToMap should have comment or be unexported (golint)
    • vault-config-operator/api/v1alpha1/utils/vaultengineobject.go
    • Line 29: warning: exported type VaultEngineObject should have comment or be unexported (golint)
    • Line 35: warning: exported type VaultEngineEndpoint should have comment or be unexported (golint)
    • Line 40: warning: exported function NewVaultEngineEndpoint should have comment or be unexported (golint)
    • Line 47: warning: exported method VaultEngineEndpoint.Exists should have comment or be unexported (golint)
    • Line 68: warning: exported method VaultEngineEndpoint.CreateOrUpdateTuneConfig should have comment or be unexported (golint)
    • vault-config-operator/api/v1alpha1/randomsecret_types.go
    • Line 69: warning: exported method RandomSecret.GetPath should have comment or be unexported (golint)
    • Line 72: warning: exported method RandomSecret.GetPayload should have comment or be unexported (golint)
    • Line 77: warning: exported method RandomSecret.IsEquivalentToDesiredState should have comment or be unexported (golint)
    • Line 81: warning: exported method RandomSecret.IsInitialized should have comment or be unexported (golint)
    • Line 85: warning: exported method RandomSecret.PrepareInternalValues should have comment or be unexported (golint)
    • Line 89: warning: exported type PasswordPolicy should have comment or be unexported (golint)
    • Line 114: warning: exported method RandomSecret.GetConditions should have comment or be unexported (golint)
    • Line 114: warning: receiver name m should be consistent with previous receiver name d for RandomSecret (golint)
    • Line 118: warning: exported method RandomSecret.SetConditions should have comment or be unexported (golint)
    • Line 118: warning: receiver name m should be consistent with previous receiver name d for RandomSecret (golint)
    • Line 147: warning: exported type PasswordPolicyFormat should have comment or be unexported (golint)
    • Line 152: warning: exported type PasswordPolicyRule should have comment or be unexported (golint)
    • Line 158: warning: exported method RandomSecret.GenerateNewPassword should have comment or be unexported (golint)
    • Line 168: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 177: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 241: warning: exported method RandomSecret.IsValid should have comment or be unexported (golint)
    • Line 241: warning: receiver name r should be consistent with previous receiver name d for RandomSecret (golint)
    • Line 246: warning: receiver name r should be consistent with previous receiver name d for RandomSecret (golint)
    • Line 253: warning: receiver name r should be consistent with previous receiver name d for RandomSecret (golint)
    • Line 267: warning: receiver name r should be consistent with previous receiver name d for RandomSecret (golint)
    • vault-config-operator/api/v1alpha1/databasesecretengineconfig_types.go
    • Line 55: warning: exported type RootCredentialConfig should have comment or be unexported (golint)
    • Line 87: warning: exported method DatabaseSecretEngineConfig.GetPath should have comment or be unexported (golint)
    • Line 90: warning: exported method DatabaseSecretEngineConfig.GetPayload should have comment or be unexported (golint)
    • Line 93: warning: exported method DatabaseSecretEngineConfig.IsEquivalentToDesiredState should have comment or be unexported (golint)
    • Line 99: warning: exported method DatabaseSecretEngineConfig.IsInitialized should have comment or be unexported (golint)
    • Line 103: warning: exported method DatabaseSecretEngineConfig.PrepareInternalValues should have comment or be unexported (golint)
    • Line 107: warning: exported method DatabaseSecretEngineConfig.IsValid should have comment or be unexported (golint)
    • Line 107: warning: receiver name r should be consistent with previous receiver name d for DatabaseSecretEngineConfig (golint)
    • Line 112: warning: receiver name r should be consistent with previous receiver name d for DatabaseSecretEngineConfig (golint)
    • Line 169: warning: exported type DBSEConfig should have comment or be unexported (golint)
    • Line 226: warning: exported method DatabaseSecretEngineConfig.GetConditions should have comment or be unexported (golint)
    • Line 226: warning: receiver name m should be consistent with previous receiver name d for DatabaseSecretEngineConfig (golint)
    • Line 230: warning: exported method DatabaseSecretEngineConfig.SetConditions should have comment or be unexported (golint)
    • Line 230: warning: receiver name m should be consistent with previous receiver name d for DatabaseSecretEngineConfig (golint)
    • Line 234: warning: exported method DatabaseSecretEngineConfig.SetUsernameAndPassword should have comment or be unexported (golint)
    • Line 234: warning: receiver name m should be consistent with previous receiver name d for DatabaseSecretEngineConfig (golint)
    • Line 264: warning: exported function DBSEConfigFromMap should have comment or be unexported (golint)
    • Line 276: warning: exported method DBSEConfig.ToMap should have comment or be unexported (golint)
    • Line 292: warning: receiver name r should be consistent with previous receiver name d for DatabaseSecretEngineConfig (golint)
    • Line 296: warning: receiver name r should be consistent with previous receiver name d for DatabaseSecretEngineConfig (golint)
    • vault-config-operator/api/v1alpha1/kubernetesauthenginerole_types.go
    • Line 54: warning: exported type TargetNamespaceConfig should have comment or be unexported (golint)
    • Line 69: warning: exported method KubernetesAuthEngineRole.GetPath should have comment or be unexported (golint)
    • Line 72: warning: exported method KubernetesAuthEngineRole.GetPayload should have comment or be unexported (golint)
    • Line 75: warning: exported method KubernetesAuthEngineRole.IsEquivalentToDesiredState should have comment or be unexported (golint)
    • Line 80: warning: exported method KubernetesAuthEngineRole.IsInitialized should have comment or be unexported (golint)
    • Line 84: warning: exported method KubernetesAuthEngineRole.PrepareInternalValues should have comment or be unexported (golint)
    • Line 99: warning: receiver name r should be consistent with previous receiver name d for KubernetesAuthEngineRole (golint)
    • Line 122: warning: exported method KubernetesAuthEngineRole.IsValid should have comment or be unexported (golint)
    • Line 122: warning: receiver name r should be consistent with previous receiver name d for KubernetesAuthEngineRole (golint)
    • Line 127: warning: exported type VRole should have comment or be unexported (golint)
    • Line 201: warning: exported method KubernetesAuthEngineRole.GetConditions should have comment or be unexported (golint)
    • Line 201: warning: receiver name m should be consistent with previous receiver name d for KubernetesAuthEngineRole (golint)
    • Line 205: warning: exported method KubernetesAuthEngineRole.SetConditions should have comment or be unexported (golint)
    • Line 205: warning: receiver name m should be consistent with previous receiver name d for KubernetesAuthEngineRole (golint)
    • Line 209: warning: exported method KubernetesAuthEngineRole.SetInternalNamespaces should have comment or be unexported (golint)
    • Line 209: warning: receiver name m should be consistent with previous receiver name d for KubernetesAuthEngineRole (golint)
    • Line 238: warning: exported function VRoleFromMap should have comment or be unexported (golint)
    • Line 255: warning: exported method VRole.ToMap should have comment or be unexported (golint)
    • Line 272: warning: receiver name r should be consistent with previous receiver name d for KubernetesAuthEngineRole (golint)
    • Line 276: warning: receiver name r should be consistent with previous receiver name d for KubernetesAuthEngineRole (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell75%

Misspell Finds commonly misspelled English words