Preparing report...

Report for github.com/adracus/kubeception

A+    Excellent!    Found 31 issues across 49 files

Tweet

gofmt93%

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!


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!


golint40%

Golint is a linter for Go source code.

    • kubeception/pkg/controller/certificate/keypair/helper.go
    • Line 21: warning: exported function ReadSecret should have comment or be unexported (golint)
    • Line 46: warning: exported function DecodePrivateKey should have comment or be unexported (golint)
    • Line 55: warning: exported function EncodePrivateKey should have comment or be unexported (golint)
    • Line 62: warning: exported function DecodePublicKey should have comment or be unexported (golint)
    • Line 71: warning: exported function EncodePublicKey should have comment or be unexported (golint)
    • Line 78: warning: exported function EncodeKeyPair should have comment or be unexported (golint)
    • Line 82: warning: exported function UpdateSecret should have comment or be unexported (golint)
    • Line 90: warning: exported function GetKeyPairFromSecret should have comment or be unexported (golint)
    • Line 99: warning: exported function ComputeChecksum should have comment or be unexported (golint)
    • Line 115: warning: exported function UpdateChecksum should have comment or be unexported (golint)
    • kubeception/pkg/apis/kubeception/v1alpha1/register.go
    • Line 9: warning: exported const GroupName should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported var SchemeGroupVersion should have comment or be unexported (golint)
    • Line 15: warning: exported function Resource should have comment or be unexported (golint)
    • Line 22: warning: exported var AddToScheme should have comment or be unexported (golint)
    • kubeception/pkg/util/conversion/types/types.go
    • Line 11: warning: exported var String should have comment or be unexported (golint)
    • Line 16: warning: exported type Check should have comment or be unexported (golint)
    • Line 20: warning: exported type CheckFunc should have comment or be unexported (golint)
    • Line 22: warning: exported method CheckFunc.Check should have comment or be unexported (golint)
    • Line 26: warning: exported function CheckAll should have comment or be unexported (golint)
    • Line 35: warning: exported function Kind should have comment or be unexported (golint)
    • Line 44: warning: exported function CheckKind should have comment or be unexported (golint)
    • Line 51: warning: exported function EqualTo should have comment or be unexported (golint)
    • kubeception/pkg/util/pointers/pointers.go
    • Line 3: warning: exported function Int64 should have comment or be unexported (golint)
    • Line 7: warning: exported function Int32 should have comment or be unexported (golint)
    • Line 11: warning: exported function Bool should have comment or be unexported (golint)
    • Line 15: warning: exported function DerefBoolOrDefault should have comment or be unexported (golint)
    • Line 22: warning: exported function DerefInt32OrDefault should have comment or be unexported (golint)
    • Line 29: warning: exported function DerefInt64OrDefault should have comment or be unexported (golint)
    • kubeception/pkg/apitypes/apitypes.go
    • Line 16: warning: exported method IP.MarshalJSON should have comment or be unexported (golint)
    • Line 30: warning: exported method IP.DeepCopy should have comment or be unexported (golint)
    • Line 34: warning: exported method IP.DeepCopyInto should have comment or be unexported (golint)
    • Line 38: warning: exported method IP.UnmarshalJSON should have comment or be unexported (golint)
    • Line 52: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 56: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 58: warning: exported function NewBigInt should have comment or be unexported (golint)
    • Line 68: warning: exported method BigInt.DeepCopy should have comment or be unexported (golint)
    • Line 72: warning: exported method BigInt.DeepCopyInto should have comment or be unexported (golint)
    • Line 76: warning: exported method BigInt.MarshalJSON should have comment or be unexported (golint)
    • Line 80: warning: exported method BigInt.UnmarshalJSON should have comment or be unexported (golint)
    • Line 100: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 104: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • kubeception/pkg/util/controller/reconciler.go
    • Line 14: warning: exported type WithContext should have comment or be unexported (golint)
    • Line 18: warning: exported method WithContext.InjectStopChannel should have comment or be unexported (golint)
    • Line 23: warning: exported function NewWithContext should have comment or be unexported (golint)
    • Line 27: warning: exported type WithClient should have comment or be unexported (golint)
    • Line 31: warning: exported function NewWithClient should have comment or be unexported (golint)
    • Line 35: warning: exported method WithClient.InjectClient should have comment or be unexported (golint)
    • Line 40: warning: exported type WithScheme should have comment or be unexported (golint)
    • Line 44: warning: exported method WithScheme.InjectScheme should have comment or be unexported (golint)
    • Line 49: warning: exported function NewWithScheme should have comment or be unexported (golint)
    • Line 53: warning: exported type WithLog should have comment or be unexported (golint)
    • Line 57: warning: exported method WithLog.InjectLogger should have comment or be unexported (golint)
    • Line 62: warning: exported function NewWithLog should have comment or be unexported (golint)
    • kubeception/pkg/util/util.go
    • Line 67: warning: exported function RequestFromObject should have comment or be unexported (golint)
    • Line 87: warning: exported function LocalObjectReferenceToObject should have comment or be unexported (golint)
    • Line 121: warning: exported function SetMetaDataAnnotation should have comment or be unexported (golint)
    • Line 144: warning: exported function TypeToKind should have comment or be unexported (golint)
    • Line 153: warning: exported function MustTypeToKind should have comment or be unexported (golint)
    • kubeception/pkg/apis/kubeception/helper/load.go
    • Line 12: warning: exported const Group should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported var Scheme should have comment or be unexported (golint)
    • Line 38: warning: exported function LoadClusterConfig should have comment or be unexported (golint)
    • Line 46: warning: exported function LoadMachineConfig should have comment or be unexported (golint)
    • kubeception/pkg/apis/certificate/v1alpha1/types.go
    • Line 10: warning: exported type Type should have comment or be unexported (golint)
    • Line 13: warning: exported const CACert should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported const PrivateKeyDataKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported const SecretsSelfProvisioned should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported type KeyPairSpec should have comment or be unexported (golint)
    • Line 63: warning: exported type KeyPairStatus should have comment or be unexported (golint)
    • Line 67: warning: exported type KeyPairConditionType should have comment or be unexported (golint)
    • Line 70: warning: exported const KeyPairPresent should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: exported type KeyPairCondition should have comment or be unexported (golint)
    • Line 87: warning: exported type CertificateSubject should have comment or be unexported (golint)
    • Line 92: warning: exported type CertificateInfo should have comment or be unexported (golint)
    • Line 123: warning: exported type CertificateSpec should have comment or be unexported (golint)
    • Line 130: warning: exported type CertificateSigner should have comment or be unexported (golint)
    • kubeception/pkg/util/conversion/conversion.go
    • Line 10: warning: exported function TypeEnforceStruct should have comment or be unexported (golint)
    • Line 17: warning: exported function TypeEnforceSlice should have comment or be unexported (golint)
    • Line 24: warning: exported function CheckStruct should have comment or be unexported (golint)
    • Line 31: warning: exported function EnforceStruct should have comment or be unexported (golint)
    • Line 48: warning: exported function EnforcePtrStruct should have comment or be unexported (golint)
    • Line 60: warning: exported function EnforceStructField should have comment or be unexported (golint)
    • Line 69: warning: exported function EnforcePtrStructField should have comment or be unexported (golint)
    • Line 78: warning: exported function EnforceGetter should have comment or be unexported (golint)
    • Line 89: warning: exported function EnforceAccessor should have comment or be unexported (golint)
    • Line 96: warning: exported function EnforceSlice should have comment or be unexported (golint)
    • Line 105: warning: exported function EnforceSetSliceIndex should have comment or be unexported (golint)
    • Line 115: warning: exported function EnforceSliceIndex should have comment or be unexported (golint)
    • Line 124: warning: exported function EnforceSliceIndexGetter should have comment or be unexported (golint)
    • Line 133: warning: exported function EnforceSliceIndexAddress should have comment or be unexported (golint)
    • Line 155: warning: exported function EnforceSliceIndexAccessor should have comment or be unexported (golint)
    • kubeception/pkg/controller/certificate/keypair/add.go
    • Line 13: warning: exported const Name should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type AddArgs should have comment or be unexported (golint)
    • Line 20: warning: exported var DefaultArgs should have comment or be unexported (golint)
    • Line 22: warning: exported function AddToManager should have comment or be unexported (golint)
    • Line 26: warning: exported function AddToManagerWithArgs should have comment or be unexported (golint)
    • kubeception/pkg/controller/certificate/certificate/add.go
    • Line 13: warning: exported const Name should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type AddArgs should have comment or be unexported (golint)
    • Line 20: warning: exported var DefaultArgs should have comment or be unexported (golint)
    • Line 22: warning: exported function AddToManager should have comment or be unexported (golint)
    • Line 26: warning: exported function AddToManagerWithArgs should have comment or be unexported (golint)
    • kubeception/pkg/controller/certificate/certificate/helper.go
    • Line 21: warning: exported function TemplateForCertificate should have comment or be unexported (golint)
    • Line 56: warning: exported function ReadSecret should have comment or be unexported (golint)
    • Line 65: warning: exported function UpdateSecret should have comment or be unexported (golint)
    • Line 73: warning: exported function GetCertificateFromSecret should have comment or be unexported (golint)
    • Line 82: warning: exported function ComputeChecksum should have comment or be unexported (golint)
    • Line 87: warning: exported function UpdateChecksum should have comment or be unexported (golint)
    • kubeception/pkg/apis/kubeception/v1alpha1/types.go
    • Line 9: warning: exported var ClusterConfigKind should have comment or be unexported (golint)
    • Line 44: warning: comment on exported type Scheduler should be of the form "Scheduler ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported type MachineConfig should be of the form "MachineConfig ..." (with optional leading article) (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!