Preparing report...

Report for github.com/softonic/node-policy-webhook

A    Great!    Found 9 issues across 12 files

Tweet

gofmt91%

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!


golint33%

Golint is a linter for Go source code.

    • node-policy-webhook/pkg/admission/fetcher.go
    • Line 13: warning: exported type FetcherInterface should have comment or be unexported (golint)
    • Line 17: warning: exported type NodePolicyProfileFetcher should have comment or be unexported (golint)
    • Line 21: warning: exported function NewNodePolicyProfileFetcher should have comment or be unexported (golint)
    • Line 27: warning: exported method NodePolicyProfileFetcher.Get should have comment or be unexported (golint)
    • node-policy-webhook/pkg/admission/patch.go
    • Line 9: warning: exported type PatcherInterface should have comment or be unexported (golint)
    • Line 13: warning: exported type Patcher should have comment or be unexported (golint)
    • Line 15: warning: exported type PatchOperation should have comment or be unexported (golint)
    • Line 21: warning: exported function NewPatcher should have comment or be unexported (golint)
    • Line 25: warning: exported method Patcher.CreatePatch should have comment or be unexported (golint)
    • node-policy-webhook/pkg/admission/reviewer.go
    • Line 13: warning: exported const PROFILE_ANNOTATION should have comment or be unexported (golint)
    • Line 15: warning: exported type AdmissionReviewer should have comment or be unexported (golint)
    • Line 20: warning: exported function NewNodePolicyAdmissionReviewer should have comment or be unexported (golint)
    • node-policy-webhook/pkg/log/level.go
    • Line 5: warning: exported const WARNING should have comment or be unexported (golint)
    • Line 6: warning: exported const NOTICE should have comment or be unexported (golint)
    • Line 7: warning: exported const INFO should have comment or be unexported (golint)
    • Line 8: warning: exported const EXTENDED should have comment or be unexported (golint)
    • Line 9: warning: exported const DEBUG should have comment or be unexported (golint)
    • Line 10: warning: exported const TRACE should have comment or be unexported (golint)
    • node-policy-webhook/pkg/http/handler.go
    • Line 13: warning: exported type HttpHandler should have comment or be unexported (golint)
    • Line 17: warning: exported function NewHttpHanlder should have comment or be unexported (golint)
    • Line 23: warning: exported method HttpHandler.HealthCheckHandler should have comment or be unexported (golint)
    • Line 30: warning: exported method HttpHandler.MutationHandler should have comment or be unexported (golint)
    • Line 68: warning: error should be the last type when returning multiple items (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!