Preparing report...

Report for github.com/sigstore/policy-controller

(v0.10.0)

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


gocyclo82%

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_test.go
    • Line 1936: warning: cyclomatic complexity 50 of function TestValidatePodSpecNonDefaultNamespace() is high (> 15) (gocyclo)
    • Line 131: warning: cyclomatic complexity 47 of function TestValidatePodSpec() is high (> 15) (gocyclo)
    • Line 3164: warning: cyclomatic complexity 27 of function TestCheckOptsFromAuthority() is high (> 15) (gocyclo)
    • Line 3051: warning: cyclomatic complexity 22 of function TestRekorClientAndKeysFromAuthority() is high (> 15) (gocyclo)
    • Line 2927: warning: cyclomatic complexity 17 of function TestFulcioCertsFromAuthority() is high (> 15) (gocyclo)
    • third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/nodes.go
    • Line 288: warning: cyclomatic complexity 25 of function (*printer).objectType() is high (> 15) (gocyclo)
    • Line 109: warning: cyclomatic complexity 24 of function (*printer).output() is high (> 15) (gocyclo)
    • Line 519: warning: cyclomatic complexity 19 of function (*printer).list() is high (> 15) (gocyclo)
    • Line 42: warning: cyclomatic complexity 18 of function (*printer).collectComments() is high (> 15) (gocyclo)
    • Line 454: warning: cyclomatic complexity 16 of function (*printer).alignedItems() is high (> 15) (gocyclo)
    • third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/scanner/scanner.go
    • Line 130: warning: cyclomatic complexity 23 of function (*Scanner).Scan() is high (> 15) (gocyclo)
    • Line 272: warning: cyclomatic complexity 23 of function (*Scanner).scanNumber() 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)
    • pkg/webhook/validator.go
    • Line 477: warning: cyclomatic complexity 30 of function ValidatePolicy() is high (> 15) (gocyclo)
    • Line 828: warning: cyclomatic complexity 29 of function ValidatePolicyAttestationsForAuthority() is high (> 15) (gocyclo)
    • Line 1245: warning: cyclomatic complexity 17 of function getConfigs() is high (> 15) (gocyclo)
    • Line 1338: warning: cyclomatic complexity 17 of function checkOptsFromAuthority() 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!