Preparing report...

Report for gitproxy.zycloud.tk/sigstore/policy-controller

(v0.13.0)

A+    Excellent!    Found 30 issues across 177 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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo83%

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.

    • pkg/webhook/validator.go
    • Line 1350: warning: cyclomatic complexity 32 of function checkOptsFromAuthority() is high (> 15) (gocyclo)
    • Line 479: warning: cyclomatic complexity 30 of function ValidatePolicy() is high (> 15) (gocyclo)
    • Line 830: warning: cyclomatic complexity 29 of function ValidatePolicyAttestationsForAuthority() is high (> 15) (gocyclo)
    • Line 1257: warning: cyclomatic complexity 17 of function getConfigs() is high (> 15) (gocyclo)
    • pkg/webhook/validator_test.go
    • Line 1964: warning: cyclomatic complexity 50 of function TestValidatePodSpecNonDefaultNamespace() is high (> 15) (gocyclo)
    • Line 134: warning: cyclomatic complexity 47 of function TestValidatePodSpec() is high (> 15) (gocyclo)
    • Line 3192: warning: cyclomatic complexity 26 of function TestCheckOptsFromAuthority() is high (> 15) (gocyclo)
    • Line 3079: warning: cyclomatic complexity 21 of function TestRekorClientAndKeysFromAuthority() is high (> 15) (gocyclo)
    • Line 2955: warning: cyclomatic complexity 16 of function TestFulcioCertsFromAuthority() is high (> 15) (gocyclo)
    • third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/scanner/scanner.go
    • Line 272: warning: cyclomatic complexity 23 of function (*Scanner).scanNumber() is high (> 15) (gocyclo)
    • Line 130: warning: cyclomatic complexity 23 of function (*Scanner).Scan() is high (> 15) (gocyclo)
    • Line 393: warning: cyclomatic complexity 18 of function (*Scanner).scanHeredoc() is high (> 15) (gocyclo)
    • Line 231: warning: cyclomatic complexity 17 of function (*Scanner).scanComment() is high (> 15) (gocyclo)
    • Line 477: warning: cyclomatic complexity 16 of function (*Scanner).scanString() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!