Preparing report...

Report for github.com/darkowlzz/operator-toolkit

A+    Excellent!    Found 41 issues across 173 files

Tweet

gofmt99%

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!


gocyclo98%

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.


golint79%

Golint is a linter for Go source code.

    • operator-toolkit/example/controllers/configmap_admission_controller.go
    • Line 15: warning: exported type ConfigMapAdmissionController should have comment or be unexported (golint)
    • Line 30: warning: exported function NewConfigMapAdmissionController should have comment or be unexported (golint)
    • Line 39: warning: exported method ConfigMapAdmissionController.Name should have comment or be unexported (golint)
    • Line 43: warning: exported method ConfigMapAdmissionController.GetNewObject should have comment or be unexported (golint)
    • Line 47: warning: exported method ConfigMapAdmissionController.RequireDefaulting should have comment or be unexported (golint)
    • Line 53: warning: exported method ConfigMapAdmissionController.RequireValidating should have comment or be unexported (golint)
    • Line 59: warning: exported method ConfigMapAdmissionController.Default should have comment or be unexported (golint)
    • Line 67: warning: exported method ConfigMapAdmissionController.ValidateCreate should have comment or be unexported (golint)
    • Line 74: warning: exported method ConfigMapAdmissionController.ValidateUpdate should have comment or be unexported (golint)
    • Line 81: warning: exported method ConfigMapAdmissionController.ValidateDelete should have comment or be unexported (golint)
    • Line 85: warning: exported method ConfigMapAdmissionController.SetupWithManager should have comment or be unexported (golint)
    • operator-toolkit/declarative/applier/apply.go
    • Line 20: warning: exported type DirectApplier should have comment or be unexported (golint)
    • Line 25: warning: exported function NewDirectApplier should have comment or be unexported (golint)
    • Line 42: warning: exported method DirectApplier.Apply should have comment or be unexported (golint)
    • operator-toolkit/operator/v1/executor/executor.go
    • Line 29: warning: exported const Parallel should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: context.Context should be the first parameter of a function (golint)
    • Line 122: warning: context.Context should be the first parameter of a function (golint)
    • Line 164: warning: context.Context should be the first parameter of a function (golint)
    • Line 228: warning: context.Context should be the first parameter of a function (golint)
    • operator-toolkit/example/controllers/game/configmap_operand.go
    • Line 35: warning: exported method ConfigmapOperand.Name should have comment or be unexported (golint)
    • Line 36: warning: exported method ConfigmapOperand.Requires should have comment or be unexported (golint)
    • Line 37: warning: exported method ConfigmapOperand.RequeueStrategy should have comment or be unexported (golint)
    • Line 38: warning: exported method ConfigmapOperand.ReadyCheck should have comment or be unexported (golint)
    • Line 41: warning: exported method ConfigmapOperand.PostReady should have comment or be unexported (golint)
    • Line 43: warning: exported method ConfigmapOperand.Ensure should have comment or be unexported (golint)
    • Line 75: warning: exported method ConfigmapOperand.Delete should have comment or be unexported (golint)
    • Line 79: warning: exported function NewConfigmapOperand should have comment or be unexported (golint)
    • operator-toolkit/example/controllers/game/controller.go
    • Line 27: warning: exported method GameController.Default should have comment or be unexported (golint)
    • Line 29: warning: exported method GameController.Validate should have comment or be unexported (golint)
    • Line 31: warning: exported method GameController.Initialize should have comment or be unexported (golint)
    • Line 47: warning: exported method GameController.Operate should have comment or be unexported (golint)
    • Line 51: warning: exported method GameController.Cleanup should have comment or be unexported (golint)
    • Line 55: warning: exported method GameController.UpdateStatus should have comment or be unexported (golint)
    • operator-toolkit/example/controllers/externalGameSync/controller.go
    • Line 1: warning: don't use MixedCaps in package name; externalGameSync should be externalgamesync (golint)
    • Line 18: warning: exported method ExternalGameSyncController.Ensure should have comment or be unexported (golint)
    • Line 19: warning: exported method ExternalGameSyncController.Delete should have comment or be unexported (golint)
    • Line 20: warning: exported method ExternalGameSyncController.List should have comment or be unexported (golint)
    • Line 24: warning: exported function NewExternalGameSyncController should have comment or be unexported (golint)
    • operator-toolkit/webhook/admission/validator.go
    • Line 17: warning: comment on exported type ValidateCreateFunc should be of the form "ValidateCreateFunc ..." (with optional leading article) (golint)
    • Line 20: warning: exported type ValidateUpdateFunc should have comment or be unexported (golint)
    • Line 21: warning: exported type ValidateDeleteFunc should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words