Preparing report...

Report for github.com/ex-preman/pdfcpu

(v0.4.2)

A+    Excellent!    Found 29 issues across 245 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!


gofmt99%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo88%

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/pdfcpu/primitives/content.go
    • Line 1236: warning: cyclomatic complexity 18 of function (*Content).render() is high (> 15) (gocyclo)
    • Line 136: warning: cyclomatic complexity 17 of function (*Content).validateRegions() is high (> 15) (gocyclo)
    • Line 596: warning: cyclomatic complexity 17 of function (*Content).calcInputFont() is high (> 15) (gocyclo)
    • pkg/pdfcpu/primitives/imageBox.go
    • Line 259: warning: cyclomatic complexity 17 of function (*ImageBox).imageResource() is high (> 15) (gocyclo)
    • Line 163: warning: cyclomatic complexity 16 of function (*ImageBox).mergeIn() is high (> 15) (gocyclo)
    • pkg/pdfcpu/font/fontDict.go
    • Line 337: warning: cyclomatic complexity 22 of function calcWidthArray() is high (> 15) (gocyclo)
    • Line 64: warning: cyclomatic complexity 16 of function IndRefsForUserfontUpdate() is high (> 15) (gocyclo)
    • pkg/pdfcpu/form/form.go
    • Line 212: warning: cyclomatic complexity 93 of function ListFormFields() is high (> 15) (gocyclo)
    • Line 853: warning: cyclomatic complexity 51 of function ResetFormFields() is high (> 15) (gocyclo)
    • Line 748: warning: cyclomatic complexity 23 of function RemoveFormFields() is high (> 15) (gocyclo)
    • Line 1085: warning: cyclomatic complexity 20 of function LockFormFields() is high (> 15) (gocyclo)
    • Line 621: warning: cyclomatic complexity 16 of function annotIndRefForFieldID() is high (> 15) (gocyclo)
    • pkg/pdfcpu/annotation.go
    • Line 732: warning: cyclomatic complexity 19 of function RemoveAnnotationsFromPageDict() is high (> 15) (gocyclo)
    • Line 826: warning: cyclomatic complexity 18 of function RemoveAnnotations() is high (> 15) (gocyclo)
    • pkg/api/form.go
    • Line 697: warning: cyclomatic complexity 17 of function multiFillFormCSV() is high (> 15) (gocyclo)
    • Line 597: warning: cyclomatic complexity 16 of function multiFillFormJSON() is high (> 15) (gocyclo)
    • pkg/pdfcpu/primitives/pdf.go
    • Line 725: warning: cyclomatic complexity 17 of function (*PDF).calcInheritedFonts() is high (> 15) (gocyclo)
    • Line 1022: warning: cyclomatic complexity 17 of function (*PDF).RenderPages() is high (> 15) (gocyclo)
    • Line 614: warning: cyclomatic complexity 16 of function (*PDF).ensureFont() is high (> 15) (gocyclo)
    • Line 406: warning: cyclomatic complexity 16 of function (*PDF).Validate() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words

    • pkg/api/test/createUserFont_test.go
    • Line 138: warning: "proclam" is a misspelling of "proclaim" (misspell)
    • Line 222: warning: "UNIVERSALE" is a misspelling of "UNIVERSE" (misspell)
    • Line 312: warning: "internacional" is a misspelling of "international" (misspell)
    • Line 313: warning: "independente" is a misspelling of "independence" (misspell)
    • Line 342: warning: "internacional" is a misspelling of "international" (misspell)