Preparing report...

Report for github.com/redhat-cop/patch-operator

(v0.0.0-20211216023717-aa7a03b388c9)

A    Great!    Found 6 issues across 10 files

Tweet

gofmt90%

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!


gocyclo90%

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.


golint50%

Golint is a linter for Go source code.

    • controllers/customresourcedefinition_controller.go
    • Line 38: warning: exported function NewCustomResourceDefinitionReconciler should have comment or be unexported (golint)
    • Line 59: warning: exported method CustomResourceDefinitionReconciler.GetModels should have comment or be unexported (golint)
    • Line 96: warning: should not use basic type string as key in context.WithValue (golint)
    • controllers/inject_webhook.go
    • Line 28: warning: exported type PatchType should have comment or be unexported (golint)
    • Line 41: warning: comment on exported type PatchInjector should be of the form "PatchInjector ..." (with optional leading article) (golint)
    • Line 50: warning: exported function NewPatchInjector should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method PatchInjector.Handle should be of the form "Handle ..." (golint)
    • Line 60: warning: should not use basic type string as key in context.WithValue (golint)
    • controllers/patch_controller.go
    • Line 181: warning: receiver name er should be consistent with previous receiver name r for PatchReconciler (golint)
    • Line 211: warning: receiver name er should be consistent with previous receiver name r for PatchReconciler (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!


misspell90%

Misspell Finds commonly misspelled English words