Preparing report...

Report for kmodules.xyz/webhook-runtime

A    Great!    Found 12 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!


gocyclo71%

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.

    • /kmodules.xyz/webhook-runtime/client/workload/v1/workload.go
    • Line 86: warning: cyclomatic complexity 39 of function (*workloads).Create() is high (> 15) (gocyclo)
    • Line 376: warning: cyclomatic complexity 28 of function (*workloads).List() is high (> 15) (gocyclo)
    • Line 540: warning: cyclomatic complexity 26 of function (*workloads).PatchObject() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 21 of function (*workloads).Update() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 21 of function (*workloads).Get() is high (> 15) (gocyclo)
    • Line 270: warning: cyclomatic complexity 20 of function (*workloads).Delete() is high (> 15) (gocyclo)

golint14%

Golint is a linter for Go source code.

    • /kmodules.xyz/webhook-runtime/client/workload/v1/factory.go
    • Line 39: warning: exported function NewWorkload should have comment or be unexported (golint)
    • Line 49: warning: exported function NewObjectForGVK should have comment or be unexported (golint)
    • Line 64: warning: exported function NewObject should have comment or be unexported (golint)
    • Line 129: warning: comment on exported function ConvertToWorkload should be of the form "ConvertToWorkload ..." (golint)
    • Line 193: warning: exported function ApplyWorkload should have comment or be unexported (golint)
    • /kmodules.xyz/webhook-runtime/registry/admissionreview/v1beta1/admission_review.go
    • Line 31: warning: exported type AdmissionHookFunc should have comment or be unexported (golint)
    • Line 33: warning: exported type REST should have comment or be unexported (golint)
    • Line 41: warning: exported function NewREST should have comment or be unexported (golint)
    • Line 47: warning: exported method REST.New should have comment or be unexported (golint)
    • Line 51: warning: exported method REST.GroupVersionKind should have comment or be unexported (golint)
    • Line 55: warning: exported method REST.NamespaceScoped should have comment or be unexported (golint)
    • Line 59: warning: exported method REST.Create should have comment or be unexported (golint)
    • /kmodules.xyz/webhook-runtime/admission/v1beta1/workload/workload.go
    • Line 63: warning: exported function NewWorkloadWebhook should have comment or be unexported (golint)
    • Line 79: warning: exported method WorkloadWebhook.Resource should have comment or be unexported (golint)
    • Line 83: warning: exported method WorkloadWebhook.Initialize should have comment or be unexported (golint)
    • Line 96: warning: exported method WorkloadWebhook.Admit should have comment or be unexported (golint)
    • /kmodules.xyz/webhook-runtime/runtime/serializer/versioning/codec.go
    • Line 24: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 26: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 29: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 31: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • /kmodules.xyz/webhook-runtime/admission/v1beta1/generic/generic.go
    • Line 41: warning: exported type GenericWebhook should have comment or be unexported (golint)
    • Line 57: warning: exported function NewGenericWebhook should have comment or be unexported (golint)
    • Line 74: warning: exported method GenericWebhook.Resource should have comment or be unexported (golint)
    • Line 78: warning: exported method GenericWebhook.Initialize should have comment or be unexported (golint)
    • Line 91: warning: exported method GenericWebhook.Admit should have comment or be unexported (golint)
    • /kmodules.xyz/webhook-runtime/admission/v1beta1/errors.go
    • Line 26: warning: exported function StatusUninitialized should have comment or be unexported (golint)
    • Line 36: warning: exported function StatusInternalServerError should have comment or be unexported (golint)
    • Line 46: warning: exported function StatusBadRequest should have comment or be unexported (golint)
    • Line 56: warning: exported function StatusForbidden 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!