Preparing report...

Report for github.com/danielgtaylor/huma

(v1.14.1)

A+    Excellent!    Found 11 issues across 54 files

Tweet

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!


gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

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.

    • patch.go
    • Line 114: warning: cyclomatic complexity 24 of function generatePatch() is high (> 15) (gocyclo)
    • resolver.go
    • Line 173: warning: cyclomatic complexity 48 of function setFields() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 17 of function resolveFields() is high (> 15) (gocyclo)
    • Line 91: warning: cyclomatic complexity 16 of function parseParamValue() is high (> 15) (gocyclo)
    • operation.go
    • Line 215: warning: cyclomatic complexity 43 of function (*Operation).Run() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 16 of function (*Operation).toOpenAPI() is high (> 15) (gocyclo)
    • graphql.go
    • Line 164: warning: cyclomatic complexity 31 of function (*Router).handleOperation() is high (> 15) (gocyclo)
    • context.go
    • Line 307: warning: cyclomatic complexity 30 of function (*hcontext).writeModel() is high (> 15) (gocyclo)
    • graphql_test.go
    • Line 62: warning: cyclomatic complexity 16 of function TestGraphQL() is high (> 15) (gocyclo)
    • schema/schema.go
    • Line 240: warning: cyclomatic complexity 57 of function GenerateFromField() is high (> 15) (gocyclo)
    • Line 466: warning: cyclomatic complexity 36 of function GenerateWithMode() is high (> 15) (gocyclo)
    • Line 159: warning: cyclomatic complexity 25 of function (*Schema).HasValidation() is high (> 15) (gocyclo)
    • graphql_model.go
    • Line 65: warning: cyclomatic complexity 50 of function (*Router).generateGraphModel() is high (> 15) (gocyclo)

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!


misspell94%

Misspell Finds commonly misspelled English words

    • error.go
    • Line 13: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 33: warning: "occurances" is a misspelling of "occurrences" (misspell)
    • Line 40: warning: "occurence" is a misspelling of "occurrence" (misspell)
    • Line 41: warning: "occurence" is a misspelling of "occurrence" (misspell)